Skip to content

Commit 845be11

Browse files
committed
update-rc.d: remove dead code
1 parent fb46fed commit 845be11

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

completions/update-rc.d

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _update_rc_d()
77
local cur prev words cword
88
_init_completion || return
99

10-
local sysvdir services options valid_options
10+
local sysvdir services options
1111

1212
[[ -d /etc/rc.d/init.d ]] && sysvdir=/etc/rc.d/init.d \
1313
|| sysvdir=/etc/init.d
@@ -17,11 +17,6 @@ _update_rc_d()
1717
options=( -f -n )
1818

1919
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-
) )
2520
COMPREPLY=( $(compgen -W '${options[@]} ${services[@]}' \
2621
-X '$(tr " " "|" <<<${words[@]})' -- "$cur") )
2722
elif [[ "$prev" == ?($(tr " " "|" <<<"${services[*]}")) ]]; then

0 commit comments

Comments
 (0)