summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngmar Vanhassel <ingmar@exherbo.org>2009-11-19 02:58:42 +0100
committerCarl Worth <cworth@cworth.org>2009-11-19 11:31:44 +0100
commit4033d87fddff62cfd615899991955867659ade01 (patch)
tree8640bf3f21ef933ad328c6c434a60accefc7b7e4
parente5da2b701fc172d2255f205414f18c40f4343fbb (diff)
bash-completion: Bash has & should use [[ == ]]
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
-rw-r--r--notmuch-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/notmuch-completion.bash b/notmuch-completion.bash
index 4255717..b4335fd 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
}