From: Ingmar Vanhassel Date: Thu, 19 Nov 2009 01:58:42 +0000 (+0100) Subject: bash-completion: Bash has & should use [[ == ]] X-Git-Tag: 0.1~425 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=4033d87fddff62cfd615899991955867659ade01 bash-completion: Bash has & should use [[ == ]] Signed-off-by: Ingmar Vanhassel --- diff --git a/notmuch-completion.bash b/notmuch-completion.bash index 42557173..b4335fdf 100644 --- a/notmuch-completion.bash +++ b/notmuch-completion.bash @@ -52,11 +52,11 @@ _notmuch() COMPREPLY=() prev=${COMP_WORDS[COMP_CWORD-1]} - if [ "$COMP_CWORD" = "1" ]; then + if [[ "$COMP_CWORD" == "1" ]]; then COMPREPLY=( $(compgen -W "${commands}" -- ${current}) ) fi - if [ $prev = "help" ] && [ "$COMP_CWORD" = "2" ]; then + if [[ $prev = "help" && "$COMP_CWORD" == "2" ]]; then COMPREPLY=( $(compgen -W "${help_options}" -- ${current}) ) fi }