[pacman-dev] [PATCH] bash_completion: negate expression inside brackets
Avoids letting the shell evaluate the ! as something else (e.g. if ! is an alias). Signed-off-by: Dave Reisner <d@falconindy.com> --- contrib/bash_completion | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/contrib/bash_completion b/contrib/bash_completion index 1ec2cd5..486870f 100644 --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -75,7 +75,7 @@ _pacman() { if [[ $? != 0 ]]; then _arch_ptr2comp core - elif ! [[ $prev =~ ^-\w*[Vbhr] || + elif [[ ! $prev =~ ^-\w*[Vbhr] || $prev = --@(cachedir|config|dbpath|help|logfile|root|version) ]] then [[ $cur = -* ]] && _arch_ptr2comp ${o#* } common || -- 1.7.2
On Sun, Jul 25, 2010 at 7:43 PM, Dave Reisner <d@falconindy.com> wrote:
Avoids letting the shell evaluate the ! as something else (e.g. if ! is an alias).
Thanks, applied to maint. -Dan
On Sun, Jul 25, 2010 at 07:49:33PM -0500, Dan McGee wrote:
On Sun, Jul 25, 2010 at 7:43 PM, Dave Reisner <d@falconindy.com> wrote:
Avoids letting the shell evaluate the ! as something else (e.g. if ! is an alias).
Thanks, applied to maint.
-Dan
I'm noticing that I misread the expression and my patch actually changes the logic in a way that isn't intended. Would it be better to patch the patch? Or just send a new patch? d
On Mon, Jul 26, 2010 at 9:23 AM, Dave Reisner <d@falconindy.com> wrote:
On Sun, Jul 25, 2010 at 07:49:33PM -0500, Dan McGee wrote:
On Sun, Jul 25, 2010 at 7:43 PM, Dave Reisner <d@falconindy.com> wrote:
Avoids letting the shell evaluate the ! as something else (e.g. if ! is an alias).
Thanks, applied to maint.
-Dan
I'm noticing that I misread the expression and my patch actually changes the logic in a way that isn't intended. Would it be better to patch the patch? Or just send a new patch?
New patch would be fine, as I haven't pushed it to the official tree yet. -Dan
participants (2)
-
Dan McGee
-
Dave Reisner