summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-07-26 10:49:43 -0400
committerDan McGee <dan@archlinux.org>2010-07-27 10:11:04 -0500
commit52118bf0f084e891b53bcf05f9e6021ebb26fb13 (patch)
tree95e9027bd04b187439d551eedac9c1a63537afd6
parentff689b6a383cbeb5ea699d587fe8975d71cae600 (diff)
bash_completion: negate expression inside brackets
Avoids letting the shell evaluate ! as something else (e.g. an alias). Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--contrib/bash_completion4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/bash_completion b/contrib/bash_completion
index 1ec2cd53..bdc4754a 100644
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -75,8 +75,8 @@ _pacman() {
if [[ $? != 0 ]]; then
_arch_ptr2comp core
- elif ! [[ $prev =~ ^-\w*[Vbhr] ||
- $prev = --@(cachedir|config|dbpath|help|logfile|root|version) ]]
+ elif [[ ! $prev =~ ^-\w*[Vbhr] &&
+ ! $prev = --@(cachedir|config|dbpath|help|logfile|root|version) ]]
then
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
case ${o% *} in