From 52118bf0f084e891b53bcf05f9e6021ebb26fb13 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 26 Jul 2010 10:49:43 -0400 Subject: bash_completion: negate expression inside brackets Avoids letting the shell evaluate ! as something else (e.g. an alias). Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- contrib/bash_completion | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2