bug-bash
[Top][All Lists]
Advanced

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

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


From: Tim Friske
Subject: Bash's declare -p HISTIGNORE brings bash to a halt! Why?
Date: Sat, 11 Jan 2014 23:54:52 +0100

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

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