Hi,

executing the following code in GNU bash, Version 4.2.45(1)-release
(x86_64-redhat-linux-gnu), Fedora 19 ...

    shopt -s extglob
    export 
HISTIGNORE="!(+(!([[\:space\:]]))+([[\:space\:]])+(!([[\:space\:]])))"
    declare -p HISTIGNORE

... brings bash to a full stop. It does not print a command prompt
hereafter. Why is that.

Background:

All I want to tell bash is to ignore any simple, i.e. one word
command. Bash should not remember command lines like `cd`, `pwd`,
`history`, etc. My original definition of the `HISTIGNORE` variable
looked like this:

    export HISTIGNORE="!(+(!([[:space:]]))+([[:space:]])+(!([[:space:]])))"

I added a `\` backslash character before each `:` colon character
because according to the `bash` info pages the latter separates each
(extended) shell glob, i.e. pattern from another. Without escaping the
single pattern does not have any effect and a simple command still
makes it into history.

Cheers
Tim

Reply via email to