summaryrefslogtreecommitdiff
path: root/completions/update-rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'completions/update-rc.d')
-rw-r--r--completions/update-rc.d11
1 files changed, 3 insertions, 8 deletions
diff --git a/completions/update-rc.d b/completions/update-rc.d
index 384b8dd4..31cd820b 100644
--- a/completions/update-rc.d
+++ b/completions/update-rc.d
@@ -7,7 +7,7 @@ _update_rc_d()
local cur prev words cword
_init_completion || return
- local sysvdir services options valid_options
+ local sysvdir services options
[[ -d /etc/rc.d/init.d ]] && sysvdir=/etc/rc.d/init.d \
|| sysvdir=/etc/init.d
@@ -17,13 +17,8 @@ _update_rc_d()
options=( -f -n )
if [[ $cword -eq 1 || "$prev" == -* ]]; then
- valid_options=( $(\
- tr " " "\n" <<<"${words[*]} ${options[*]}" \
- | command sed -ne "/$(command sed "s/ /\\|/g" <<<"${options[*]}")/p" \
- | sort | uniq -u \
- ) )
- COMPREPLY=( $(compgen -W '${options[@]} ${services[@]}' \
- -X '$(tr " " "|" <<<${words[@]})' -- "$cur") )
+ COMPREPLY=( $(compgen -W '${options[@]} ${services[@]}' \
+ -X '$(tr " " "|" <<<${words[@]})' -- "$cur") )
elif [[ "$prev" == ?($(tr " " "|" <<<"${services[*]}")) ]]; then
COMPREPLY=( $(compgen -W 'remove defaults start stop' -- "$cur") )
elif [[ "$prev" == defaults && "$cur" == [0-9] ]]; then