Re: Positional parameter & array slicing bug with empty arguments

2014-01-11 Thread Pierre Gaston
On Sun, Jan 12, 2014 at 3:11 AM, Theodoros V. Kalamatianos wrote: > Hi, > > I have bumped into a rather strange issue: > > $ set -- ''; printf "=%s=\n" "$@" x > == > =x= > $ set -- ''; printf "=%s=\n" "${@:1}" x > =x= > > Notice how in the second version the empty positional parameter is no > lon

Re: bash signal trap bug

2014-01-11 Thread Chet Ramey
On 1/8/14, 12:01 PM, Paweł Gołaszewski wrote: > Hello, > > I think I've found bug in signal handling in bash. > > Look at 2 scripts: > http://www.blues.gda.pl/SOURCES/show_logs.sh > http://www.blues.gda.pl/SOURCES/show_logs.zsh > > Both are identical. "zsh" version works fine, "bash" version doe

Positional parameter & array slicing bug with empty arguments

2014-01-11 Thread Theodoros V. Kalamatianos
Hi, I have bumped into a rather strange issue: $ set -- ''; printf "=%s=\n" "$@" x == =x= $ set -- ''; printf "=%s=\n" "${@:1}" x =x= Notice how in the second version the empty positional parameter is no longer displayed. Also compare with this version: $ set -- '' ''; printf "=%s=\n" "${@:1

Positional parameter/Array slicing bug with empty arguments

2014-01-11 Thread Theodoros V. Kalamatianos
Hi, I have bumped into a rather strange issue: $ set -- ''; printf "=%s=\n" "$@" x == =x= $ set -- ''; printf "=%s=\n" "${@:1}" x =x= Notice how in the second version the empty positional parameter is no longer displayed. Also compare with this version: $ set -- '' ''; printf "=%s=\n" "${@:1

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

2014-01-11 Thread Chet Ramey
On 1/11/14, 8:48 PM, Tim Friske wrote: > Hi Chet, > > apparently bash does not recognize the ":" colon characters in POSIX > character classes when assigned to the "HISTIGNORE" variable. > > I tried to set the "HISTIGNORE" variable directly from within a > non-login, interactive session. But stil

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

2014-01-11 Thread Tim Friske
Hi Chet, apparently bash does not recognize the ":" colon characters in POSIX character classes when assigned to the "HISTIGNORE" variable. I tried to set the "HISTIGNORE" variable directly from within a non-login, interactive session. But still I cannot convince bash's history with the following

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

2014-01-11 Thread Chet Ramey
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 extg

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

2014-01-11 Thread Tim Friske
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 HISTSIZE="1" declare -x HISTFILESIZ

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

2014-01-11 Thread Chet Ramey
On 1/11/14, 5:54 PM, Tim Friske wrote: > 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 HISTIGNO

Re: Some Special Array Variables Only Kind Of Initialized

2014-01-11 Thread Chet Ramey
On 1/11/14, 5:54 PM, John R. Graham wrote: > On 01/11/2014 04:55 PM, Chet Ramey wrote: >> On 1/10/14, 6:06 PM, John R. Graham wrote: >>> Some of the automagically created special array variables (GROUPS and >>> DIRSTACK for soer; perhaps others) appear to not be fully initialized. >>> Their values

Re: Some Special Array Variables Only Kind Of Initialized

2014-01-11 Thread John R. Graham
On 01/11/2014 04:55 PM, Chet Ramey wrote: On 1/10/14, 6:06 PM, John R. Graham wrote: Some of the automagically created special array variables (GROUPS and DIRSTACK for soer; perhaps others) appear to not be fully initialized. Their values don't appear correctly in some corner cases until they'

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

2014-01-11 Thread Tim Friske
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 c

Re: Some Special Array Variables Only Kind Of Initialized

2014-01-11 Thread Chet Ramey
On 1/10/14, 6:06 PM, John R. Graham wrote: > Some of the automagically created special array variables (GROUPS and > DIRSTACK for soer; perhaps others) appear to not be fully initialized. Their > values don't appear correctly in some corner cases until they've been > referenced with parameter ex