From 81d7ecb5ac476ecbb323a5e78c2fe1ed4ca3a6fd Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Fri, 25 Nov 2016 21:56:56 +1100 Subject: [PATCH] Remove superfluous declarations of local variables. --- bash-completion/dput.bash | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bash-completion/dput.bash b/bash-completion/dput.bash index e56e000..7a01efd 100644 --- a/bash-completion/dput.bash +++ b/bash-completion/dput.bash @@ -8,28 +8,28 @@ have dput && _dput () { - local cur prev options paroptions special i delayed_options hosts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - options=" + + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local options=" -c --config -d --debug -D --dinstall -f --force -h --help -H --host-list -l --lintian -o --check-only -p --print -P --passive -s --simulate -u --unchecked -e --delayed -v --version -V --check-version " - hosts=$( { + local hosts=$( { grep "^\[.*\]" $HOME/.dput.cf 2> /dev/null | tr -d [] || /bin/true grep "^\[.*\]" /etc/dput.cf 2> /dev/null | tr -d [] || /bin/true } | grep -v '^DEFAULT$' | sort -u) - paroptions="$options $hosts" + local paroptions="$options $hosts" case "$prev" in --delayed|-e) - delayed_options='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15' + local delayed_options='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15' COMPREPLY=( $( compgen -W "$delayed_options" | grep ^$cur ) ) ;; --config|-c) -- 2.11.4.GIT