Lines 80-94
Link Here
|
80 |
} |
80 |
} |
81 |
|
81 |
|
82 |
describe_enable_options() { |
82 |
describe_enable_options() { |
83 |
echo "<target> : Target name or number (from 'list' action)" |
|
|
84 |
echo "--global : Enable for all users" |
83 |
echo "--global : Enable for all users" |
|
|
84 |
echo "<target> : Target name or number (from 'list' action)" |
85 |
} |
85 |
} |
86 |
|
86 |
|
87 |
do_enable() { |
87 |
do_enable() { |
88 |
local bc bcdir="${ROOT}/${HOME}/.bash_completion.d" |
88 |
local bc bcdir="${ROOT}/${HOME}/.bash_completion.d" mode="" |
89 |
|
89 |
|
90 |
if [[ ${1} == "--global" ]] ; then |
90 |
if [[ ${1} == "--global" ]] ; then |
91 |
bcdir="${ROOT}/etc/bash_completion.d" |
91 |
bcdir="${ROOT}/etc/bash_completion.d" |
|
|
92 |
mode="-m 0755" |
92 |
shift |
93 |
shift |
93 |
fi |
94 |
fi |
94 |
|
95 |
|
Lines 96-102
Link Here
|
96 |
|
97 |
|
97 |
# create directory if necessary |
98 |
# create directory if necessary |
98 |
if [[ ! -d ${bcdir} && -w $(dirname ${bcdir}) ]] ; then |
99 |
if [[ ! -d ${bcdir} && -w $(dirname ${bcdir}) ]] ; then |
99 |
mkdir ${bcdir} || die -q "Failed to create ${bcdir}" |
100 |
mkdir ${mode} ${bcdir} || die -q "Failed to create ${bcdir}" |
100 |
elif [[ ! -d ${bcdir} ]] ; then |
101 |
elif [[ ! -d ${bcdir} ]] ; then |
101 |
die -q "You don't have permission to create ${bcdir}" |
102 |
die -q "You don't have permission to create ${bcdir}" |
102 |
fi |
103 |
fi |
Lines 182-189
Link Here
|
182 |
} |
183 |
} |
183 |
|
184 |
|
184 |
describe_disable_options() { |
185 |
describe_disable_options() { |
185 |
echo "<target> : Target name or number (from 'list' action)" |
|
|
186 |
echo "--global : Disable for all users" |
186 |
echo "--global : Disable for all users" |
|
|
187 |
echo "<target> : Target name or number (from 'list' action)" |
187 |
} |
188 |
} |
188 |
|
189 |
|
189 |
|
190 |
|