Probably not a bug but I was surprised: $' does not work inside "..." close.

2021-03-17 Thread Dale R. Worley
I have it encoded in my head that $ inside "..." is respected. Subtly, the $'...' construction is not respected inside "...". After reading the manual page carefully, I realized this is because the interpretation of $'...' is not part of parameter expansion (despite its $) but rather it is a

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Chet Ramey
On 3/17/21 4:04 PM, Greg Wooledge wrote: On Wed, Mar 17, 2021 at 09:58:24PM +0200, Ilkka Virta wrote: On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge wrote: I thought, for a moment, that bash already used $'...' quoting for newlines, but it turns out that's false. At least for declare -p. It

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
On 3/17/21 3:29 PM, Michael Felt wrote: I tried as many combinations of commands as I could - and it seems that the regular behavior of dup2 on the opened fifo is enough to maintain communication. It's not, since FIFOs exist in the file system and have to be available to open(2) when the

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Léa Gris
Le 17/03/2021 à 21:13, Alex fxmbsw7 Ratchev écrivait : hm at least now we know array declare -p formatting would work in workarounds, good to .. :) Instead of: var=$'1\e[G\e[K2' ; declare -p var do: var=$'1\e[G\e[K2' ; printf 'declare -- %s\n' "${var@A}" And if you want a human readable

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Léa Gris
Le 17/03/2021 à 20:58, Ilkka Virta écrivait : On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge wrote: I thought, for a moment, that bash already used $'...' quoting for newlines, but it turns out that's false. At least for declare -p. It would be nice if it did, though. Newlines, carriage

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Alex fxmbsw7 Ratchev
hm at least now we know array declare -p formatting would work in workarounds, good to .. :) On Wed, Mar 17, 2021 at 9:05 PM Greg Wooledge wrote: > On Wed, Mar 17, 2021 at 09:58:24PM +0200, Ilkka Virta wrote: > > On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge wrote: > > > > > I thought, for a

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Greg Wooledge
On Wed, Mar 17, 2021 at 09:58:24PM +0200, Ilkka Virta wrote: > On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge wrote: > > > I thought, for a moment, that bash already used $'...' quoting for > > newlines, but it turns out that's false. At least for declare -p. > > It would be nice if it did,

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Ilkka Virta
On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge wrote: > I thought, for a moment, that bash already used $'...' quoting for > newlines, but it turns out that's false. At least for declare -p. > It would be nice if it did, though. Newlines, carriage returns, escape > characters, etc. > It does

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Alex fxmbsw7 Ratchev
when it works for you its no bug for me, ill try later that completition removation stuff but as upstream works it works, .. :) On Wed, Mar 17, 2021 at 7:06 PM Chet Ramey wrote: > On 3/17/21 12:45 PM, Alex fxmbsw7 Ratchev wrote: > > and what about the traps to not-with-slash one ? > > bash:

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Michael Felt
I tried as many combinations of commands as I could - and it seems that the regular behavior of dup2 on the opened fifo is enough to maintain communication. Going into a system test (ie. a normal AdoptOpemJDK build process) that has nearly 3500 commands, each with two process_substitution

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Greg Wooledge
On Wed, Mar 17, 2021 at 01:55:56PM -0400, Eli Schwartz wrote: > On 3/17/21 12:43 PM, Alex fxmbsw7 Ratchev wrote: > > it makes the output no more possible if interpreted by tty > > the \e's get processed by terminal and no more .. just an example where it > > is so: > > > > var=$'1\e[G\e[K2' ;

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
On 3/17/21 11:17 AM, Michael Felt wrote: On 11/03/2021 18:11, Chet Ramey wrote: On 3/11/21 11:28 AM, Michael Felt wrote: Hi, Issue: AdoptOpenJDK build process makes bash calls in a particular way. An abbreviated (shorter pathnames) example is: ``` bash-5.0$ /usr/bin/printf "Building

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Chet Ramey
On 3/17/21 12:45 PM, Alex fxmbsw7 Ratchev wrote: and what about the traps to not-with-slash one ? bash: type: traps: not found I get a slash appended when I try it. Maybe try it with a shell that doesn't have bash-completion loaded, or remove all current completions and try again. -- ``The

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Chet Ramey
On 3/17/21 11:52 AM, Michael Felt wrote: OK - this process on github has not gone exactly as I intended - merged with master - while I wanted to update, ie., merge with branch 5.0.18. So, the link may not be accurate. This is not correct. Process substitution is a word expansion that results

Re: is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Eli Schwartz
On 3/17/21 12:43 PM, Alex fxmbsw7 Ratchev wrote: > it makes the output no more possible if interpreted by tty > the \e's get processed by terminal and no more .. just an example where it > is so: > > var=$'1\e[G\e[K2' ; declare -p var > > if G was H for other line then it completly messes the

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Alex fxmbsw7 Ratchev
and what about the traps to not-with-slash one ? bash: type: traps: not found On Wed, Mar 17, 2021 at 4:39 PM Chet Ramey wrote: > On 3/17/21 6:43 AM, Alex fxmbsw7 Ratchev wrote: > > i code on a bash feature linker 'ogt2' that binds functions, aliases, > etc, > > by filenames and their content (

is it a bug that \e's dont get escaped in declare -p output

2021-03-17 Thread Alex fxmbsw7 Ratchev
it makes the output no more possible if interpreted by tty the \e's get processed by terminal and no more .. just an example where it is so: var=$'1\e[G\e[K2' ; declare -p var if G was H for other line then it completly messes the terminal up isnt it better to escape by \e ? ..

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Michael Felt
OK - this process on github has not gone exactly as I intended - merged with master - while I wanted to update, ie., merge with branch 5.0.18. So, the link may not be accurate. The change is simple: diff --git a/subst.c b/subst.c index 843c9d39..3792e45c 100644 --- a/subst.c +++ b/subst.c @@

Re: Changing the way bash expands associative array subscripts

2021-03-17 Thread Jesse Hathaway
I would welcome this change, I struggled today with trying to increment an associative array in an arithmetic context. I think this change would make for much better ergonomics when working with associative arrays. Yours kindly, Jesse Hathaway

Re: bug in auto completition, dunno if by completition package

2021-03-17 Thread Chet Ramey
On 3/17/21 6:43 AM, Alex fxmbsw7 Ratchev wrote: i code on a bash feature linker 'ogt2' that binds functions, aliases, etc, by filenames and their content ( and location ( prepath \\ subpath ) ) now i have /root/ogt2/traps/ and being in /root/ogt2 i type traps i expected traps/ it autocompleted

Re: so-called pipe files (sh-np-*) do not get deleted when processes close.

2021-03-17 Thread Michael Felt
On 11/03/2021 18:11, Chet Ramey wrote: On 3/11/21 11:28 AM, Michael Felt wrote: Hi, Issue: AdoptOpenJDK build process makes bash calls in a particular way. An abbreviated (shorter pathnames) example is: ``` bash-5.0$ /usr/bin/printf "Building targets 'product-images legacy-jre-image

Re: Likely Bash bug

2021-03-17 Thread Jay via Bug reports for the GNU Bourne Again SHell
Thanks for your feedback. For reference, other details are as follows: In addition to bash, the distribution includes sh and ash shells/scripts. ▶—— Linux Kernel ——◀ Kernel Release: 4.19.23 Build Date: Tue Feb 19 15:07:58 GMT 2019 Build GCC: 7.3.0 OS Support:

Re: crash in __waitpid() via waitchld() in bash 4.4.23(1) on arm64

2021-03-17 Thread Chet Ramey
On 3/17/21 9:53 AM, Peter Morrow wrote: Hello, I've had a crash in bash 4.4.23(1) running on arm64 with glibc 2.28. This is a custom distro based off the yocto thud release. I've only seen this twice in the last 6 months or so and thus is not easy to recreate. I've never seen it. My guess is

Re: is it a bug that PWD=whatever sets PS1's \w to that regardless

2021-03-17 Thread Robert Elz
Date:Wed, 17 Mar 2021 09:12:19 -0400 From:Chet Ramey Message-ID: | If you don't modify PWD, PWD always reflects the current working directory, Of course, but how is that relevant? But even that isn't actually specified, if one does a popd does PWD not change?

crash in __waitpid() via waitchld() in bash 4.4.23(1) on arm64

2021-03-17 Thread Peter Morrow
Hello, I've had a crash in bash 4.4.23(1) running on arm64 with glibc 2.28. This is a custom distro based off the yocto thud release. I've only seen this twice in the last 6 months or so and thus is not easy to recreate. Stacktrace looks like this: #0 libc_2_28!__waitpid + 0x30 #1 bash!waitchld

Re: is it a bug that PWD=whatever sets PS1's \w to that regardless

2021-03-17 Thread Chet Ramey
On 3/16/21 11:20 PM, Robert Elz wrote: | If you want to set PWD instead of letting cd/pushd/popd manage it, | all bets are off. I agree with that as far as what you get when you expand $PWD (even the pwd command, so using `pwd` as an alternative if PWD has been manually set is not

Re: Likely Bash bug

2021-03-17 Thread David
On Wed, 17 Mar 2021 at 23:05, Greg Wooledge wrote: > On Wed, Mar 17, 2021 at 10:59:42AM +0700, Robert Elz wrote: > > | Operating system is BionicPup64 8.0. > > That might. More importantly is probably whatever package management > > system it uses. I have no idea what the "ash" the bug

Re: Likely Bash bug

2021-03-17 Thread Greg Wooledge
On Wed, Mar 17, 2021 at 10:59:42AM +0700, Robert Elz wrote: > | Operating system is BionicPup64 8.0. > > That might. More importantly is probably whatever package management > system it uses. I have no idea what the "ash" the bug report refers to > is (there is an ancient shell of that

bug in auto completition, dunno if by completition package

2021-03-17 Thread Alex fxmbsw7 Ratchev
i code on a bash feature linker 'ogt2' that binds functions, aliases, etc, by filenames and their content ( and location ( prepath \\ subpath ) ) now i have /root/ogt2/traps/ and being in /root/ogt2 i type traps i expected traps/ it autocompleted none more it shows 'traps' as only option to

Re: Changing the way bash expands associative array subscripts

2021-03-17 Thread Robert Elz
Date:Wed, 17 Mar 2021 08:28:26 +0100 From:Alex fxmbsw7 Ratchev Message-ID: | you write like when word splitting no use double quotes | sure but as far as i understood: | key='$( faulty_command )' | unset -v assoc["$key"] | would still get expanded

Re: Changing the way bash expands associative array subscripts

2021-03-17 Thread Alex fxmbsw7 Ratchev
you write like when word splitting no use double quotes sure but as far as i understood: key='$( faulty_command )' unset -v assoc["$key"] would still get expanded i cant get friendly'ed to builtins being over keywords much more to say but i cant, greets tho On Wed, Mar 17, 2021 at 4:46 AM