bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash's declare -p HISTIGNORE brings bash to a halt! Why?


From: Chet Ramey
Subject: Re: Bash's declare -p HISTIGNORE brings bash to a halt! Why?
Date: Sat, 11 Jan 2014 20:47:53 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 1/11/14, 7:52 PM, Tim Friske wrote:
> Hi Chet,
> 
> hmm ... I simplified the pattern to "+([^[:space:]])". It works on
> when I let bash expand files but it does not keep bash from adding
> "word" commands such as "cd", "pwd", etc. My history related settings
> are as follows:
> 
> shopt -s extglob
> 
> declare -x HISTIGNORE="+([^[:space:]])"

If you want to ignore commands that don't contain a space anywhere in them,
do something like this:

HISTIGNORE='!(*[[:space:]]*)'

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]