Re: problem anomalies , possibly aliases related

2023-07-19 Thread Martin D Kealey
Hi Alex Aliases are not functions, and they don't work the same way. A function is like a separate script, except that it runs in the same process & context as the caller. Its meaning is determined as the script RUNS. An alias is quite different: it replaces tokens while the script is being PARSE

[PATCH] add libintl dep for unwind_prot

2023-07-19 Thread Grisha Levit
(so make -j works) diff --git a/Makefile.in b/Makefile.in index 7f990bfa..ce909bc6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1440,6 +1440,7 @@ sig.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h subst.o: bashintl.h ${LIBINTL_H} $(

Re: slash appended to tab so its two // at end

2023-07-19 Thread alex xmb ratchev
On Wed, Jul 19, 2023, 7:44 PM Grisha Levit wrote: > On Wed, Jul 19, 2023 at 12:57 PM Grisha Levit > wrote: > > Also I think this is not a bug -- readline is asked to append a slash > > to directory names and it does so. > > It's easy enough to avoid printing the indicator slash if we just > prin

Re: slash appended to tab so its two // at end

2023-07-19 Thread Grisha Levit
On Wed, Jul 19, 2023 at 12:57 PM Grisha Levit wrote: > Also I think this is not a bug -- readline is asked to append a slash > to directory names and it does so. It's easy enough to avoid printing the indicator slash if we just printed a path already ending in a slash. It's an improvement cosmet

Re: slash appended to tab so its two // at end

2023-07-19 Thread alex xmb ratchev
On Wed, Jul 19, 2023, 18:57 Grisha Levit wrote: > On Wed, Jul 19, 2023 at 9:07 AM Chet Ramey wrote: > > > > On 7/18/23 10:01 PM, alex xmb ratchev wrote: > > > i in 5.2.15 bash aarch64 termux did > > > > > > $ cp -ap db2.*/ > > > > > > and got > > > > > > db2.i5// db2.i7// > > > > I can't reprodu

Re: slash appended to tab so its two // at end

2023-07-19 Thread Grisha Levit
On Wed, Jul 19, 2023 at 9:07 AM Chet Ramey wrote: > > On 7/18/23 10:01 PM, alex xmb ratchev wrote: > > i in 5.2.15 bash aarch64 termux did > > > > $ cp -ap db2.*/ > > > > and got > > > > db2.i5// db2.i7// > > I can't reproduce this. This is a combination of either visible-stats or mark-directorie

Re: [PATCH] fix bind -X quoting

2023-07-19 Thread Grisha Levit
On Wed, Jul 19, 2023 at 10:47 AM Chet Ramey wrote: > Thanks for the report. It seems like your patch is incomplete, though. > After applying it: > > $ bind -x '"\eX": echo "x"' > $ bind -X > "\eX": "echo "x"" > > We probably need to suppress printing the double quotes around `out' if > print_reada

Re: [PATCH] Add missing docs for 'set +o', 'set -o'

2023-07-19 Thread Lawrence Velázquez
On Wed, Jul 19, 2023, at 9:31 AM, Beer, Mathis wrote: > On Tue, Jul 18, 2023, at 20:58:50 CEST, Lawrence Velázquez wrote: >> Presumably the synopses in all locations should also use this: >> >> -o [option-name] >> +o [option-name] >> >> -- >> vq > > Far as I can tell, they all alr

Re: [PATCH] fix bind -X quoting

2023-07-19 Thread alex xmb ratchev
On Wed, Jul 19, 2023, 4:48 PM Chet Ramey wrote: > On 7/18/23 2:22 AM, Grisha Levit wrote: > > > This patch changes rl_macro_dumper to not untranslate the macro body > > when passed a negative print_readably argument. This is technically an > > API change, so maybe not the best fix, though I doub

Re: [PATCH] fix bind -X quoting

2023-07-19 Thread Chet Ramey
On 7/18/23 2:22 AM, Grisha Levit wrote: This patch changes rl_macro_dumper to not untranslate the macro body when passed a negative print_readably argument. This is technically an API change, so maybe not the best fix, though I doubt it will impact any real usage. Thanks for the report. It se

Re: slash appended to tab so its two // at end

2023-07-19 Thread alex xmb ratchev
On Wed, Jul 19, 2023, 3:16 PM Greg Wooledge wrote: > On Wed, Jul 19, 2023 at 09:06:20AM -0400, Chet Ramey wrote: > > On 7/18/23 10:01 PM, alex xmb ratchev wrote: > > > i in 5.2.15 bash aarch64 termux did > > > > > > $ cp -ap db2.*/ > > > > > > and got > > > > > > db2.i5// db2.i7// > > > > I can't

fg tcsetpgrp() SIGTTIN/SIGTTOU race

2023-07-19 Thread Earl Chew
Bash uses tcsetpgrp() to move a program to the foreground, and conditionally resumes the program with SIGCONT if the program was stopped. Consider the following script: $ ( cmd1 ; read X ; cmd2 ) & $ ... $ fg When fg is issued, the background program is either stopped, or running. The

Re: [PATCH] Add missing docs for 'set +o', 'set -o'

2023-07-19 Thread Beer, Mathis
On Tue, Jul 18, 2023, at 20:58:50 CEST, Lawrence Velázquez wrote: > Presumably the synopses in all locations should also use this: > > -o [option-name] > +o [option-name] > > -- > vq Far as I can tell, they all already have it. It's just at the very bottom of the 'set' option li

Re: [PATCH] Add missing docs for 'set +o', 'set -o'

2023-07-19 Thread Chet Ramey
On 7/18/23 9:29 AM, Beer, Mathis wrote: Add documentation for 'set -o', 'set +o' syntax to 'help set', 'info'. 'set -o'/'set +o' matches the POSIX behavior, but Bash's own documentation should also mention it. Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chauce

Re: slash appended to tab so its two // at end

2023-07-19 Thread Greg Wooledge
On Wed, Jul 19, 2023 at 09:06:20AM -0400, Chet Ramey wrote: > On 7/18/23 10:01 PM, alex xmb ratchev wrote: > > i in 5.2.15 bash aarch64 termux did > > > > $ cp -ap db2.*/ > > > > and got > > > > db2.i5// db2.i7// > > I can't reproduce this. It's probably an artifact of some Linux vendor's prog

Re: slash appended to tab so its two // at end

2023-07-19 Thread Chet Ramey
On 7/18/23 10:01 PM, alex xmb ratchev wrote: i in 5.2.15 bash aarch64 termux did $ cp -ap db2.*/ and got db2.i5// db2.i7// I can't reproduce this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: slash appended to tab so its two // at end

2023-07-19 Thread alex xmb ratchev
On Wed, Jul 19, 2023, 11:09 AM Martin D Kealey wrote: > Hi Alex > hiii On Wed, 19 Jul 2023 at 12:01, alex xmb ratchev wrote: > >> i in 5.2.15 bash aarch64 termux did >> >> $ cp -ap db2.*/ >> > > What does your bash say in response to this: > $ type -a $( ( complete -p cp || complete -p -D ) 2>

Re: slash appended to tab so its two // at end

2023-07-19 Thread Martin D Kealey
Hi Alex On Wed, 19 Jul 2023 at 12:01, alex xmb ratchev wrote: > i in 5.2.15 bash aarch64 termux did > > $ cp -ap db2.*/ > What does your bash say in response to this: $ type -a $( ( complete -p cp || complete -p -D ) 2> /dev/null | tee -a /dev/stderr | sed -n 's/.* -F \([^ ]*\).*/\1/p' ) -Mart