From: W. Trevor King Date: Mon, 3 Sep 2012 12:08:20 +0000 (-0400) Subject: misc:completion:be.bash: use tabs to indent shell script. X-Git-Tag: 1.1.0~104 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e63a74393b376753a298231b7917faff97a38704;p=be.git misc:completion:be.bash: use tabs to indent shell script. --- diff --git a/misc/completion/be.bash b/misc/completion/be.bash old mode 100644 new mode 100755 index 1d3a941..853ec31 --- a/misc/completion/be.bash +++ b/misc/completion/be.bash @@ -16,24 +16,24 @@ # to print a list of available completions at that point _be() { - local cur prev opts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - - if [ $COMP_CWORD -eq 1 ]; then - # no command yet, show all commands - COMPREPLY=( $( compgen -W "$(be --complete)" -- $cur ) ) - else - # remove the first word (should be "be") for security reasons - unset COMP_WORDS[0] - # remove the current word and all later words, because they - # are not needed for completion. - for i in `seq $COMP_CWORD ${#COMP_WORDS[@]}`; do - unset COMP_WORDS[$i]; - done - COMPREPLY=( $( IFS=$'\n' compgen -W "$(be "${COMP_WORDS[@]}" --complete $cur)" -- $cur ) ) - fi + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + if [ $COMP_CWORD -eq 1 ]; then + # no command yet, show all commands + COMPREPLY=( $( compgen -W "$(be --complete)" -- $cur ) ) + else + # remove the first word (should be "be") for security reasons + unset COMP_WORDS[0] + # remove the current word and all later words, because they + # are not needed for completion. + for i in `seq $COMP_CWORD ${#COMP_WORDS[@]}`; do + unset COMP_WORDS[$i]; + done + COMPREPLY=( $( IFS=$'\n' compgen -W "$(be "${COMP_WORDS[@]}" --complete $cur)" -- $cur ) ) + fi } complete -F _be be