Re: ! in PS1 in posix mode

2015-10-10 Thread isabella parakiss
On 10/11/15, isabella parakiss wrote: > In posix mode, bash replaces ! in my PS1 with the history number. > > $ PS1=' ! ' > ! set -o posix > 513 exit > > It doesn't happen with any other prompt escape sequence, afaict. > This looks... intentional? WTF? > Ok I've now read this page: http://tisw

! in PS1 in posix mode

2015-10-10 Thread isabella parakiss
In posix mode, bash replaces ! in my PS1 with the history number. $ PS1=' ! ' ! set -o posix 513 exit It doesn't happen with any other prompt escape sequence, afaict. This looks... intentional? WTF? --- xoxo iza

Re: Want way to run background processes with SIGINT unignored

2015-10-10 Thread Linda Walsh
Chet Ramey wrote: On 10/10/15 4:19 PM, Linda Walsh wrote: Chet Ramey wrote: On 10/9/15 2:42 PM, Ian Jackson wrote: However, it would be very easy for bash to provide an option (via `set -o' perhaps) to disable this behaviour. That is, to allow SIGINT to be delivered normally to child proces

Re: read and env variables + POSIX => SEGFAULT

2015-10-10 Thread Linda Walsh
isabella parakiss wrote: $ a= read a <<< x # this creates a variable in the current shell $ declare -p a declare -- a="x" $ b= mapfile b <<< x# this doesn't $ declare -p b bash: declare: b: not found Very good point... more interesting is adding posix mode to the mix: #

read and env variables

2015-10-10 Thread isabella parakiss
$ a= read a <<< x # this creates a variable in the current shell $ declare -p a declare -- a="x" $ b= mapfile b <<< x# this doesn't $ declare -p b bash: declare: b: not found Other shells don't seem to agree on what should happen in this case, but it'd be nice to have a more consistent

Re: Want way to run background processes with SIGINT unignored

2015-10-10 Thread Chet Ramey
On 10/10/15 4:19 PM, Linda Walsh wrote: > Chet Ramey wrote: >> On 10/9/15 2:42 PM, Ian Jackson wrote: >>> >>> However, it would be very easy for bash to provide an option (via `set >>> -o' perhaps) to disable this behaviour. That is, to allow SIGINT to >>> be delivered normally to child processes.

Re: Want way to run background processes with SIGINT unignored

2015-10-10 Thread Linda Walsh
Chet Ramey wrote: On 10/9/15 2:42 PM, Ian Jackson wrote: However, it would be very easy for bash to provide an option (via `set -o' perhaps) to disable this behaviour. That is, to allow SIGINT to be delivered normally to child processes. I'm restricting non-standard options to `shopt' to avo

Re: bad handling of error conditions in "type -P'

2015-10-10 Thread Chet Ramey
On 10/9/15 8:17 AM, Linda Walsh wrote: > > > There are several problems with how type -P returns errors. `type -P', and `type' in general, reflects what would happen when a name is used as a command. > 1) if a file isn't executable, type returns it anyway in >> ls -l /sbin/scat > -r--r--r-- 1

Re: Want way to run background processes with SIGINT unignored

2015-10-10 Thread Chet Ramey
On 10/9/15 2:42 PM, Ian Jackson wrote: > Hi. > > I've been wrestling recently[1] with a bash script which invokes a > number of subprocesses in parallel and collects the output. The > problem is that if you ^C the script, the subprocesses carry on > running. This is because of the standards-mand

Re: make first different character bold when showing completions ala emacs

2015-10-10 Thread Chet Ramey
On 10/9/15 9:14 PM, 積丹尼 Dan Jacobson wrote: > # dpkg -i /var/cache/apt/archives/phpmyadmin_4%3a4. shows > phpmyadmin_4%3a4.4.15-1_all.deb phpmyadmin_4%3a4.5.0.2-2_all.deb > # dpkg -i /var/cache/apt/archives/phpmyadmin_4%3a4. > > Can you please make the first different character bold, like emacs

Re: command substitution is stripping set -e from options

2015-10-10 Thread Chet Ramey
On 10/8/15 2:36 PM, Christoph Gysin wrote: >> I think you're overlooking what I referred to above: that the exit status >> of a command substitution doesn't have any effect on whether the parent's >> command succeeds or fails except in one case: the right-hand-side of an >> assignment statement tha

Re: Continue behavior in devel branch

2015-10-10 Thread Chet Ramey
On 10/10/15 9:36 AM, Carlos Pita wrote: > Hi Chet, > > consider the following program: > > yyy() { > continue > } > > xxx() { > while true; do > echo x > yyy > echo y > break > done > } > > xxx > > In the bash devel branch it will ignore the continue and echo > > x > y

Continue behavior in devel branch

2015-10-10 Thread Carlos Pita
Hi Chet, consider the following program: yyy() { continue } xxx() { while true; do echo x yyy echo y break done } xxx In the bash devel branch it will ignore the continue and echo x y In the stable branch it will echo x x x x . . . forever, because the continue works