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>
This commit is contained in:
Dave Reisner 2010-07-26 10:49:43 -04:00 committed by Dan McGee
parent ff689b6a38
commit 52118bf0f0
1 changed files with 2 additions and 2 deletions

View File

@ -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