Re: command substitution is stripping set -e from options

2015-10-12 Thread Christoph Gysin
On Sat, Oct 10, 2015 at 8:24 PM, Chet Ramey wrote: > I will consider adding an option to change the behavior of command > substitution inheriting the -e option, since there doesn't seem to be > any way to decouple this behavior from posix mode. I added a patch: https://savannah.gnu.org/patch/inde

Re: ! in PS1 in posix mode

2015-10-12 Thread Linda Walsh
Chet Ramey wrote: On 10/12/15 7:02 PM, Linda Walsh wrote: It happens in posix mode. --- How lame! It's a '!' in a quoted string. Another example of posix braindeath -- how long before people realize that the thing branded 'posix' now isn't the real posix that was started to *describe*

Re: read and env variables + POSIX => SEGFAULT

2015-10-12 Thread Chet Ramey
On 10/12/15 7:39 PM, Linda Walsh wrote: a= read a <<< x;echo $? >>> 0 declare -p a >>> declare -- a="x" >>> # the manpage claims "one line is read from [the input], and the result >>> # is split by words and assigns 1st word to 1st var and so forth, but >>> # apparently the reading of

Re: ! in PS1 in posix mode

2015-10-12 Thread Chet Ramey
On 10/12/15 7:02 PM, Linda Walsh wrote: >> It happens in posix mode. > --- > How lame! It's a '!' in a quoted string. Another example > of posix braindeath -- how long before people realize that the > thing branded 'posix' now isn't the real posix that was started > to *describe* behaviors,

Re: read and env variables + POSIX => SEGFAULT

2015-10-12 Thread Linda Walsh
(Cc: Chet Ramey... forgot to send it to list...oop) Chet Ramey wrote: On 10/10/15 11:01 PM, Linda Walsh wrote: a= read a <<< x;echo $? 0 declare -p a declare -- a="x" # the manpage claims "one line is read from [the input], and the result # is split by words and assigns 1st word to 1st

Re: posix handling of mapfile: SEGFAULT

2015-10-12 Thread Linda Walsh
Chet Ramey wrote: Thanks for the report. I fixed this, and the fix is in the devel branch. `mapfile' only takes a single variable name argument, and ignores others. This is identical to the first example. --- I see... but it pointed out that declare doesn't actually die until it to

Re: ! in PS1 in posix mode

2015-10-12 Thread Linda Walsh
Chet Ramey wrote: On 10/12/15 12:28 PM, Linda Walsh wrote: Chet Ramey wrote: On 10/11/15 1:37 AM, isabella parakiss wrote: In posix mode, bash replaces ! in my PS1 with the history number. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 "The shell sh

Re: read and env variables + POSIX => SEGFAULT

2015-10-12 Thread Chet Ramey
On 10/10/15 11:01 PM, Linda Walsh wrote: >> a= read a <<< x;echo $? > 0 >> declare -p a > declare -- a="x" > # the manpage claims "one line is read from [the input], and the result > # is split by words and assigns 1st word to 1st var and so forth, but > # apparently the reading of 1 line is op

Re: Continue behavior in devel branch

2015-10-12 Thread Carlos Pita
> If not, would it be too difficult to do it myself? On a second thought, it would be easier for me to just revert the binary incompatible changes, assuming they're not too entangled with the rest. Could you give me some hints? Thank you very much.

Re: Continue behavior in devel branch

2015-10-12 Thread Carlos Pita
Ok, I see. Thank you for the answer. I've already found a program (yaourt) that wreaks havoc because of this, I gave its developers a heads up. The cause of my question is that I want to use your readline devel branch. First, I thought I would need to use the bash devel branch too, but then I rea

Re: posix handling of mapfile: SEGFAULT

2015-10-12 Thread Chet Ramey
On 10/11/15 5:57 PM, Linda Walsh wrote: > This was in the 2nd half of the note in the read&env+POSIX=>SEGFAULT, > but think it got missed by focus on the 1st part. > > # I was doing some syntax testing and decided to try posix mode > # (as it disallows various vague or unclear constructs) > # in

Re: ! in PS1 in posix mode

2015-10-12 Thread Chet Ramey
On 10/12/15 12:28 PM, Linda Walsh wrote: > > > Chet Ramey wrote: >> On 10/11/15 1:37 AM, isabella parakiss wrote: >>> In posix mode, bash replaces ! in my PS1 with the history number. >> >> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 >> >> >> "The shell s

Re: 404 error when accessing "6.9 Controlling the Prompt" in the manual

2015-10-12 Thread Chet Ramey
On 10/12/15 9:14 AM, Adrian Fita wrote: > I get 404 when I try to access "6.9 Controlling the Prompt" from the > manual, "HTML - with one web page per node" version. > > I get the page not found error from the following pages: > - https://www.gnu.org/software/bash/manual/html_node/index.html#SEC_C

404 error when accessing "6.9 Controlling the Prompt" in the manual

2015-10-12 Thread Adrian Fita
I get 404 when I try to access "6.9 Controlling the Prompt" from the manual, "HTML - with one web page per node" version. I get the page not found error from the following pages: - https://www.gnu.org/software/bash/manual/html_node/index.html#SEC_Contents - https://www.gnu.org/software/bash/manua

Re: ! in PS1 in posix mode

2015-10-12 Thread isabella parakiss
On 10/12/15, Greg Wooledge wrote: > On Mon, Oct 12, 2015 at 09:28:42AM -0700, Linda Walsh wrote: >> Chet Ramey wrote: >> >http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 >> > >> >"The shell shall replace each instance of the character '!' in PS1 with >> >the h

Re: ! in PS1 in posix mode

2015-10-12 Thread Greg Wooledge
On Mon, Oct 12, 2015 at 09:28:42AM -0700, Linda Walsh wrote: > Chet Ramey wrote: > >http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 > > > >"The shell shall replace each instance of the character '!' in PS1 with > >the history file number of the next command to

Re: ! in PS1 in posix mode

2015-10-12 Thread Linda Walsh
Chet Ramey wrote: On 10/11/15 1:37 AM, isabella parakiss wrote: In posix mode, bash replaces ! in my PS1 with the history number. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 "The shell shall replace each instance of the character '!' in PS1 with the

Re: command substitution is stripping set -e from options

2015-10-12 Thread Linda Walsh
Chet Ramey wrote: On 10/2/15 9:22 AM, Greg Wooledge wrote: On Fri, Oct 02, 2015 at 03:53:42PM +0300, Christoph Gysin wrote: I'm still curious as to why set -e is stripped in the first place? Chet can give the definitive answer, but my take is that it's a huge surprise to someone writing a fu

Re: Something strange with string replacements

2015-10-12 Thread Greg Wooledge
On Sun, Oct 11, 2015 at 04:33:11PM -0700, gaspar@gmail.com wrote: > I was just testing if I could do some things with bash and the I came across > this: > $ tigres="Un tigre, dos tigres, tres tigres" > $ echo ${tigres//[A-Z]/[a-z]} > > tt [a-z][a-z][a-z][a-z][a-z], Ale cto kkk log nfs tes tmp

Re: trap DEBUG and $_

2015-10-12 Thread Geir Hauge
On Mon, Oct 12, 2015 at 07:24:00AM +0200, isabella parakiss wrote: > On 10/11/15, Dan Stromberg wrote: > > Is there a way of outputting a datestamp to shell stderr at the _beginning_ > > of the execution of a command, that won't wipe out $_? > > > > I use $_ quite a bit for the last argument to th