From 845be116278719c2a4ab4d4edaee81f38cc17b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 25 Nov 2019 23:24:40 +0800 Subject: [PATCH] update-rc.d: remove dead code --- completions/update-rc.d | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/completions/update-rc.d b/completions/update-rc.d index 384b8dd4803..8a58f78a804 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,11 +17,6 @@ _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") ) elif [[ "$prev" == ?($(tr " " "|" <<<"${services[*]}")) ]]; then