bash-completion: Bash has & should use [[ == ]]

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
This commit is contained in:
Ingmar Vanhassel 2009-11-19 02:58:42 +01:00 committed by Carl Worth
parent e5da2b701f
commit 4033d87fdd

View file

@ -52,11 +52,11 @@ _notmuch()
COMPREPLY=() COMPREPLY=()
prev=${COMP_WORDS[COMP_CWORD-1]} prev=${COMP_WORDS[COMP_CWORD-1]}
if [ "$COMP_CWORD" = "1" ]; then if [[ "$COMP_CWORD" == "1" ]]; then
COMPREPLY=( $(compgen -W "${commands}" -- ${current}) ) COMPREPLY=( $(compgen -W "${commands}" -- ${current}) )
fi fi
if [ $prev = "help" ] && [ "$COMP_CWORD" = "2" ]; then if [[ $prev = "help" && "$COMP_CWORD" == "2" ]]; then
COMPREPLY=( $(compgen -W "${help_options}" -- ${current}) ) COMPREPLY=( $(compgen -W "${help_options}" -- ${current}) )
fi fi
} }