Re: Why can't I say 3? Bug or feature?

2012-12-06 Thread Dan Douglas
being explicit. If you don't understand the copy descriptor and all of a sudden see yet another use for the character to the left of a redirection operator, you're going to be even more confused. -- Dan Douglas

Re: fd leak with {fd}

2012-11-30 Thread Dan Douglas
. $ bash -s \EOF f() { trap 'trap - RETURN; cat /dev/fd/$x -; exec {x}-' RETURN local x : inner {x}0 cat /dev/fd/$x - } middle f outer EOF inner middle inner outer -- Dan Douglas

Re: wait unblocks before signals processed

2012-11-05 Thread Dan Douglas
are located within the main loop then monitor mode needs to be toggled off around them. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: wait unblocks before signals processed

2012-11-05 Thread Dan Douglas
://lists.gnu.org/archive/html/bug-bash/2012-05/msg00055.html I think you might be experiencing other known bugs. Chet pushed several wait/job related commits within the last few weeks. I haven't tested these yet. http://git.savannah.gnu.org/cgit/bash.git/tree/CWRU/CWRU.chlog?h=devel -- Dan Douglas

Re: set -e (no || or )

2012-10-15 Thread Dan Douglas
system. EOF esac -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: different exit codes in $? and ${PIPESTATUS[@]}

2012-10-15 Thread Dan Douglas
overload this mail by reporting that nearly every issue I've ever sent to this list over the last year or so (that turned out being legitimate) appears to have been addressed in devel (at least, according to a few minutes of testing). Thanks! :) -- Dan Douglas

Re: a recursion bug

2012-10-04 Thread Dan Douglas
() if [ $1 -ge 0 ]; then printf $1 exec dash -c ${2}f '$(($1-1)) $2' -- $@ fi ( f 100 $(typeset -f f)$'\n' ) Joking of course :o) FUNCNEST is usually good enough for me. No other shell I'm aware of even has that. -- Dan Douglas

Re: break inside a while-condition

2012-09-11 Thread Dan Douglas
to continue. -- Dan Douglas

Re: Parsing error when case in for in $()

2012-09-11 Thread Dan Douglas
; }) : $({ case . in .) :; esac; }) : $(for x in .; do case . in .) :; esac; done) : $(for x in .; do case . in .) :; esac; done) EOF -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Some issues with short-circuiting arithmetic operators

2012-09-05 Thread Dan Douglas
method is to keep track of which variables have been visited and error if any are referenced twice, rather than counting the arithmetic evaluator stack depth, so this isn't possible in that shell. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: bash does filename expansion when assigning to array member in compound form

2012-08-29 Thread Dan Douglas
-a a='([0]=foo [1]=foo [2]=foo [3]=foo)' ... -- Dan Douglas

Re: bash does filename expansion when assigning to array member in compound form

2012-08-21 Thread Dan Douglas
precludes its use. -- Dan Douglas

Re: why must non-standard $IFS members be treated so differently ?

2012-07-29 Thread Dan Douglas
[@]} ' and not `${#@}', and also that you did not set IFS=: for count_args? If you use exactly the function you sent with the default IFS then you should get 4 here. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: Doc of set -e should mention non-locality

2012-07-05 Thread Dan Douglas
On Wednesday, July 04, 2012 05:37:25 PM Rainer Blome wrote: Original-Nachricht Datum: Fri, 29 Jun 2012 18:03:13 -0500 Von: Dan Douglas orm...@gmail.com An: bug-bash@gnu.org CC: Rainer Blome rainer.bl...@gmx.de Remember that my main suggestion is to clearly document

Re: Doc of set -e should mention non-locality

2012-06-29 Thread Dan Douglas
other possible RETURN traps, but most people won't have to worry about that. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

mapfile -n seeks ahead an extra line

2012-06-20 Thread Dan Douglas
From: Dan Douglas To: bug-bash@gnu.org Subject: mapfile -n seeks ahead an extra line Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE

Re: Indirect access to variables, including arrays (was Re: Compare 2 arrays.)

2012-06-07 Thread Dan Douglas
safe extensible libraries written for a shell. -- Dan Douglas

Re: Compare 2 arrays.

2012-05-30 Thread Dan Douglas
On Wed, May 30, 2012 at 4:57 PM, Greg Wooledge wool...@eeg.ccf.org wrote: On Wed, May 30, 2012 at 10:14:42AM -0600, Bill Gradwohl wrote: What say you Chet? Bug or feature? There is no middle ground. That's unrealistic.  There are plenty of things that occupy that middle ground -- unexpected

Re: handling of test == by BASH's POSIX mode

2012-05-27 Thread Dan Douglas
check for the correctness of: $(rm -rf somepath; echo '[') x == x ] -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: handling of test == by BASH's POSIX mode

2012-05-27 Thread Dan Douglas
: 1.61 MiB # equery s bash * app-shells/bash-4.2_p28 Total files : 464 Total size : 6.33 MiB -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: quoted and concatenated positional parameters

2012-05-23 Thread Dan Douglas
5foo 1 2 3 4 51 1 2 3 4 5foo 123451 12345foo bash: 1 2 3 4 51 1 2 3 4 5foo 1 2 3 4 51 1 2 3 4 5foo 1 2 3 4 51 1 2 3 4 5foo zsh: 1 2 3 4 51 1 2 3 4 5foo 1 2 3 4 51 1 2 3 4 5foo 1 2 3 4 51 1 2 3 4 5foo -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: quoted and concatenated positional parameters

2012-05-23 Thread Dan Douglas
Ugh, Sorry, I forgot to strip trailing whitespace. If that wasn't comprehensible for anyone, the heredoc in the preceeding the testcase was: args() { printf '%s ' $@; echo; } args ${@}${1} args ${@}foo args ${@}${1} args ${@}foo IFS= args ${@}${1} args ${@}foo EOF -- Dan Douglas

Segfault on compound assignment to a variable whose name is set in the environment of a declaration builtin.

2012-05-18 Thread Dan Douglas
again. (not overly anxious for a fix.) -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: Passing variables by reference conflicts with local

2012-04-30 Thread Dan Douglas
explaination and example here: http://wiki.bash-hackers.org/commands/builtin/unset#scope Hopefully most of that is correct. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Brace expansion bug

2012-03-26 Thread Dan Douglas
found before. Looks like this applies to anything that has this sort of replacement context that contains valid brace expansion syntax inside quotes. Bash 4.2.24 - Gentoo amd64 -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: Brace expansion bug

2012-03-26 Thread Dan Douglas
On Monday, March 26, 2012 01:44:58 PM you wrote: Dan Douglas orm...@gmail.com writes: Hi, hopefully a self-explanatory one today: ~ $ ( set -x -- {a..c}; echo ${*-{1..3}} ) + echo 'a b c' 'a b c' 'a b c' a b c a b c a b c ~ $ ( set -x -- {a..c}; echo ${*/{1..3

Re: Brace expansion bug

2012-03-26 Thread Dan Douglas
On Monday, March 26, 2012 08:07:00 AM you wrote: On 03/26/2012 07:56 AM, Dan Douglas wrote: Don't know how much I'm allowed to quote here, but a quick read of the POSIX parsing rules and parameter expansion sections suggest to me that the start of the parameter expansion should be the most

Re: Inconsistent quote and escape handling in substitution part of parameter expansions.

2012-02-28 Thread Dan Douglas
would consider it as a bug. imadev:~$ q=\' imadev:~$ input=foosomethingbar imadev:~$ echo ${input//something/$q} foo'bar I meant without temporary variable. RR ormaaj@ormaajbox ~ $ ( x=abc; echo ${x/b/$'\''} ) a'c -- Dan Douglas signature.asc Description: This is a digitally

Re: Inconsistent quote and escape handling in substitution part of parameter expansions.

2012-02-28 Thread Dan Douglas
On Tuesday, February 28, 2012 06:38:22 PM John Kearney wrote: On 02/28/2012 06:31 PM, Dan Douglas wrote: On Tuesday, February 28, 2012 05:53:32 PM Roman Rakus wrote: On 02/28/2012 05:49 PM, Greg Wooledge wrote: On Tue, Feb 28, 2012 at 05:36:47PM +0100, Roman Rakus wrote: And that means

Re: Inconsistent quote and escape handling in substitution part of parameter expansions.

2012-02-28 Thread Dan Douglas
On Tuesday, February 28, 2012 06:52:13 PM John Kearney wrote: On 02/28/2012 06:43 PM, Dan Douglas wrote: On Tuesday, February 28, 2012 06:38:22 PM John Kearney wrote: On 02/28/2012 06:31 PM, Dan Douglas wrote: On Tuesday, February 28, 2012 05:53:32 PM Roman Rakus wrote: On 02/28/2012 05

Re: Pathname expansion not performed in Here Documents

2012-02-27 Thread Dan Douglas
On Monday, February 27, 2012 02:07:25 PM Davide Baldini wrote: FROM Davide Baldini On 02/27/12 04:11, Dan Douglas wrote: If word is unquoted, all lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion. No pathname expansion

Re: shopt can't set extglob in a sub-shell?

2012-02-26 Thread Dan Douglas
trap where you could just set trace on functions where you want it, but looks like even redefinitions break recursively, so you're stuck. Fortunately, there aren't a lot of good reasons to have extglob disabled to begin with (if any). -- Dan Douglas signature.asc Description: This is a digitally

Re: Pathname expansion not performed in Here Documents

2012-02-26 Thread Dan Douglas
lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion. No pathname expansion. -- Dan Douglas

Re: excess braces ignored: bug or feature ?

2012-02-17 Thread Dan Douglas
. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: bash blocking on exec assigning an output file descriptor to a fifo

2012-02-14 Thread Dan Douglas
O_NONBLOCK is up there in things I wouldn't mind using. Namely, having access to errno. I don't see any way of determining the fullness of a buffer even through /proc/self/fdinfo/ on Linux. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

[bug] Bash translates $var into $var for exported functions.

2012-01-22 Thread Dan Douglas
on Gentoo Linux amd64. -- Dan Douglas signature.asc Description: This is a digitally signed message part.

segfault expanding certain arrays created via read -N directly to an array.

2011-12-19 Thread Dan Douglas
) at shell.c:688 i = optimized out code = optimized out old_errexit_flag = 0 saverst = 0 locally_skip_execution = 0 arg_index = 3 top_level_arg_index = 3 -- Dan Douglas signature.asc Description: This is a digitally signed message part.

Re: Print non-readonly variables with declare +r -p

2011-12-14 Thread Dan Douglas
On Wednesday, December 14, 2011 10:57:21 AM Chet Ramey wrote: On 12/13/11 3:13 PM, Dan Douglas wrote: I imagine this is ok because Bash's declare -p is intended to be human- readable only, whereas Ksh guarantees -p produces output in a format reusable as input. Bash's `declare -p' output

Re: Ill positioned 'until' keyword

2011-12-14 Thread Dan Douglas
On Wednesday, December 14, 2011 05:47:24 PM Peng Yu wrote: Hi, I looks a little wired why 'until' is the way it is now. According to the manual until is before the do-done block. until test-commands; do consequent-commands; done A common design of until in other language is that it

Re: Print non-readonly variables with declare +r -p

2011-12-13 Thread Dan Douglas
On Tuesday, December 13, 2011 12:14:41 PM lhun...@mbillemo.lin-k.net wrote: Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin11.2.0 Compiler: /Developer/usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'

[bug] Command substitutions within C-style for loops. Semicolon causes error.

2011-10-28 Thread Dan Douglas
))' Segmentation fault The segfault on the subshell there is a bit odd if it were merely a syntax error. GNU bash, version 4.2.10(1)-release (x86_64-pc-linux-gnu) -Dan Douglas

<    1   2   3