We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb46fed commit 845be11Copy full SHA for 845be11
1 file changed
completions/update-rc.d
@@ -7,7 +7,7 @@ _update_rc_d()
7
local cur prev words cword
8
_init_completion || return
9
10
- local sysvdir services options valid_options
+ local sysvdir services options
11
12
[[ -d /etc/rc.d/init.d ]] && sysvdir=/etc/rc.d/init.d \
13
|| sysvdir=/etc/init.d
@@ -17,11 +17,6 @@ _update_rc_d()
17
options=( -f -n )
18
19
if [[ $cword -eq 1 || "$prev" == -* ]]; then
20
- valid_options=( $(\
21
- tr " " "\n" <<<"${words[*]} ${options[*]}" \
22
- | command sed -ne "/$(command sed "s/ /\\|/g" <<<"${options[*]}")/p" \
23
- | sort | uniq -u \
24
- ) )
25
COMPREPLY=( $(compgen -W '${options[@]} ${services[@]}' \
26
-X '$(tr " " "|" <<<${words[@]})' -- "$cur") )
27
elif [[ "$prev" == ?($(tr " " "|" <<<"${services[*]}")) ]]; then
0 commit comments