summaryrefslogtreecommitdiff
path: root/completions/update-rc.d
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
commit5732da2af736c40cf693354485446ab4867ecb4d (patch)
tree76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/update-rc.d
parent9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff)
downloadbash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/update-rc.d')
-rw-r--r--completions/update-rc.d16
1 files changed, 8 insertions, 8 deletions
diff --git a/completions/update-rc.d b/completions/update-rc.d
index 85c9a5a4..384b8dd4 100644
--- a/completions/update-rc.d
+++ b/completions/update-rc.d
@@ -17,15 +17,15 @@ _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" \
+ 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" ) )
- elif [[ "$prev" == ?($( tr " " "|" <<<${services[@]} )) ]]; then
- COMPREPLY=( $( compgen -W 'remove defaults start stop' -- "$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
COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
elif [[ "$prev" == defaults && "$cur" == [sk]?([0-9]) ]]; then
@@ -53,7 +53,7 @@ _update_rc_d()
COMPREPLY=()
fi
elif [[ "$prev" == "." ]]; then
- COMPREPLY=( $( compgen -W "start stop" -- "$cur" ) )
+ COMPREPLY=( $(compgen -W "start stop" -- "$cur") )
else
COMPREPLY=()
fi