Re: %q with truncating size loses safeness of %q

2020-04-18 Thread Sam Liddicott
In my case I was using process substitution to generate a dynamic bashrc file as part of invoking an SDK environment. Naturally those lines which emit environment variable assignments use %q I had one build version tracking variable which was to be limited to 7 characters and set to a lowercase f

Re: [bug] PROMPT_COMMAND is not executed as expected in some situations

2020-04-18 Thread Franklin, Jason
On 4/16/20 10:11 AM, Chet Ramey wrote: > On 4/16/20 9:21 AM, Franklin, Jason wrote: >> On 4/15/20 5:35 PM, Chet Ramey wrote: >>> These all pretty much all fall into the category of the editor reprinting >>> the prompt before it returns. >> >> Hmmm... >> >> So, is there no way to have Bash handle th

Re: looking for consistent C-c trap behavior

2020-04-18 Thread Chet Ramey
On 4/17/20 3:59 PM, gentoo_eshoes--- via Bug reports for the GNU Bourne Again SHell wrote: > I've noticed that if I trap SIGINT in a bash script, the behavior when > encountering C-c depends on whether an external command (eg. 'sleep 100') or > a builtin command (like 'read -p') was encountered.

Re: [PATCH] Exit status by no-argument `return' for function calls in trap handlers

2020-04-18 Thread Chet Ramey
On 4/16/20 1:21 PM, Koichi Murase wrote: > Bash Version: 5.0 > Patch Level: 11 > Release Status: release > > Summary: > > The behavior of no-argument `return' in trap handlers has been > changed from Bash 4.4 to follow the description of POSIX. Recently > this behavior caused problems in

Re: looking for consistent C-c trap behavior

2020-04-18 Thread gentoo_eshoes--- via Bug reports for the GNU Bourne Again SHell
Apr 18, 2020, 22:03 by chet.ra...@case.edu: > On 4/17/20 3:59 PM, gentoo_eshoes--- via Bug reports for the GNU Bourne > Again SHell wrote: > >> I've noticed that if I trap SIGINT in a bash script, the behavior when >> encountering C-c depends on whether an external command (eg. 'sleep 100') o

Re: looking for consistent C-c trap behavior

2020-04-18 Thread gentoo_eshoes--- via Bug reports for the GNU Bourne Again SHell
Apr 18, 2020, 23:41 by gentoo_esh...@tutanota.com: > > On another note, I naively tried to patch out the POSIX requirement, for my > own/local_use puposes but had no effect: > in this code > +  /* posix mode SIGINT during read -e. We only get here if SIGINT is > trapped. */ > +  if (posixly_

Re: [PATCH] Exit status by no-argument `return' for function calls in trap handlers

2020-04-18 Thread Koichi Murase
2020-04-19 5:12 Chet Ramey : > The POSIX wording seems straightforward and implies (B). The `action' > is a string that is defined to behave as if it were the argument to > `eval', so it can be an arbitrary command, which makes (A) unlikely. > > You could always ask the austin-group list for an int