Re: Next word of alias to alias that end with is not checked for alias

2023-01-17 Thread alex xmb ratchev
aliases are major essential part of functionality that u cant , and speak against , all the time , is only enemish nonsense On Wed, Jan 18, 2023, 2:43 AM Daniel Douglas wrote: > > Of course, all mention of aliases should really be removed from > > POSIX - aliases are even worse than "set -e". >

Re: 'exec -a' and $0 substitution

2023-01-25 Thread alex xmb ratchev
root@localhost:~# unset -v z ; cat srcpath ; bash srcpath ; ./srcpath ; "${z=$PWD/srcpath}" ; bash "$z" [[ ${z=$BASH_SOURCE} == /* ]] && t=$z || t=$PWD/$z printf %s\\n "$t" /root/srcpath /root/./srcpath /root/srcpath /root/srcpath On Thu, Jan 26, 2023, 12:51 AM Sergei Trofimovich wrote: > Hello

Re: "builtin jobs" does not output to stdout.

2023-02-11 Thread alex xmb ratchev
root@localhost:~# ( sleep .1 & jobs ) | wc -c 41 On Sat, Feb 11, 2023, 3:57 PM 岡部将幸 wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 > uname output: Linux gold 5.8.0-63-generic #71-Ubuntu S

Re: number of bugs

2023-02-13 Thread alex xmb ratchev
On Mon, Feb 13, 2023, 2:55 PM Soukaina Ramdani wrote: > Hello, > is there any chance to have the number of bugs. > Thank you. > i'd be all for persistant statistics two bugs lists , one [fixed] one [notfixed] >

Re: Having an alias and a function with the same name leads to some sort of recursion

2023-02-14 Thread alex xmb ratchev
On Tue, Feb 14, 2023, 8:58 PM Dale R. Worley wrote: > >> Looking at the manual page, it says > >> > >> ALIASES > >>Aliases allow a string to be substituted for a word when it is > used as > >>the first word of a simple command. > > Martin suggested (but IIUC didn't sent to th

Re: Bash 5.2 breaks our Arch Linux devtools

2023-02-15 Thread alex xmb ratchev
On Wed, Feb 15, 2023, 5:36 PM Mike Jonkmans wrote: > On Wed, Feb 15, 2023 at 02:29:29PM +0100, Tobias Powalowski via Bug > reports for the GNU Bourne Again SHell wrote: > > I once had that same issue: > https://lists.gnu.org/archive/html/bug-bash/2015-10/msg00013.html > > Conclusion: the shopt

Re: Having an alias and a function with the same name leads to some sort of recursion

2023-02-16 Thread alex xmb ratchev
On Thu, Feb 16, 2023, 4:14 PM Chet Ramey wrote: > On 2/14/23 2:58 PM, Dale R. Worley wrote: > >>> Looking at the manual page, it says > >>> > >>> ALIASES > >>> Aliases allow a string to be substituted for a word when it > is used as > >>> the first word of a simple command.

Re: Vulnerability Report(No SPF Record)

2023-02-16 Thread alex xmb ratchev
On Thu, Feb 16, 2023, 8:50 PM Syed Maaz wrote: > Hey Team, > > I am a security researcher,I have found this vulnerability related to > your website bash-hackers.org. > > Description : > > > This report is about misconfigured spf record flag , which can be > use to abuse the or

Re: Having an alias and a function with the same name leads to some sort of recursion

2023-02-17 Thread alex xmb ratchev
plus if an alias definition ends with a space , when in use , further aliases may get resolved ( substituded , before parsing code further ) On Fri, Feb 17, 2023, 5:37 PM Dale R. Worley wrote: > Chet Ramey writes: > > On 2/14/23 2:58 PM, Dale R. Worley wrote: > Looking at the manual page,

Re: Behaviour of an empty conditional expression is undefined?

2023-02-23 Thread alex xmb ratchev
i [[ daily , never had such.. sounds like u dont type in C in utf8 On Thu, Feb 23, 2023, 9:58 AM Qingsheng Huang wrote: > Here shows the behavious of empty conditional expressions: > > > infinite:~# [[ ]] > -bash: syntax er

Re: Behaviour of an empty conditional expression is undefined?

2023-02-23 Thread alex xmb ratchev
On Thu, Feb 23, 2023, 11:14 AM Kerin Millar wrote: > On Thu, 23 Feb 2023 11:07:52 +0100 > alex xmb ratchev wrote: > > > i [[ daily , never had such.. > > This observation isn't helpful unless you account for which version of > bash you are using. In any case,

Re: The memory occupied by bash has been increasing due to the fork bomb

2023-03-11 Thread alex xmb ratchev
i m all for such a change On Sat, Mar 11, 2023, 12:42 PM zju <21625...@zju.edu.cn> wrote: > > > > 2023年3月11日 10:50,zju <21625...@zju.edu.cn> 写道: > > > > > > > >> 2023年3月11日 06:17,Chet Ramey chet.ra...@case.edu>> 写道: > >> > >> On 3/10/23 11:37 AM, zju wrote: > >> > >>> I have already set the maxi

Re: Document that here strings don't support brace expansion.

2023-03-14 Thread alex xmb ratchev
On Tue, Mar 14, 2023, 7:04 PM Chet Ramey wrote: > On 3/14/23 11:23 AM, Dale R. Worley wrote: > > Alex Bochannek writes: > >> "The WORD undergoes tilde expansion, parameter and variable expansion, > >> command substitution, arithmetic expansion, and quote removal. Filename > >> expansion and wor

Re: Document that here strings don't support brace expansion.

2023-03-15 Thread alex xmb ratchev
On Wed, Mar 15, 2023, 8:07 AM Robert Elz wrote: > While it is probably useful to have every place where expansions occur list > which ones apply, perhaps it would (also) be useful to include the general > principle which controls all of this. > > That is, expansions are performed, late (just as c

Re: [PATCH] Save more readline state when running compgen

2023-03-21 Thread alex xmb ratchev
On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote: > On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote: > > OK, say you did in fact run compgen in the foreground -- very unusual > > because it's awkward to capture the possible completions that way -- to > > generate completions. > > Sorry I should h

Re: [PATCH] Save more readline state when running compgen

2023-03-21 Thread alex xmb ratchev
On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote: > On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote: > > OK, say you did in fact run compgen in the foreground -- very unusual > > because it's awkward to capture the possible completions that way -- to > > generate completions. > > Sorry I should h

Re: [PATCH] Save more readline state when running compgen

2023-03-21 Thread alex xmb ratchev
On Tue, Mar 21, 2023, 22:42 Grisha Levit wrote: > On Tue, Mar 21, 2023 at 5:26 PM alex xmb ratchev > wrote: > > On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote: > >> > >> compgen -G 'foo/*' >/dev/null && COMPREPLY=(bar) > > > >

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread alex xmb ratchev
how spooky , cant get read / mapfile to separate right very sad On Thu, Mar 30, 2023, 15:19 Felipe Contreras wrote: > Hi, > > Consider this example: > > IFS=, > str='foo,bar,,roo,' > printf '"%s"\n' $str > > There is a discrepancy between how this is interpreted between bash > and zs

Re: Junk at the end on history

2023-04-04 Thread alex xmb ratchev
On Tue, Apr 4, 2023, 11:39 Dan Jacobson wrote: > $ history > works fine if I pipe it into tail. > But if I just let it pour out on the screen, I get this junk after it > sitting at the prompt: > that look like terminal responses maybe u have some binary in your history ? 9997 Tue, 04 Apr 2023

Re: Error report - 3.5.3 Shell Parameter Expansion

2023-04-23 Thread alex xmb ratchev
greets .. On Sun, 23 Apr 2023, 10:23 pm Rob Liversage, wrote: > Apologies. Please ignore. I realized I was a bit hasty. > > On Sun, Apr 23, 2023 at 8:18 PM Rob Liversage > wrote: > > > Hello > > > > At: > > > https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expan

Re: recovering from parser errors during compound assignment

2023-04-26 Thread alex xmb ratchev
On Wed, Apr 26, 2023, 23:28 Grisha Levit wrote: > If a parser error is encountered when `local' is parsing an array > assignment string, the installed unwind-protects never run: > > $ f() { local -a a='(())'; }; f > bash: syntax error near unexpected token `(' > $ declare -p a FUNCNAME > declare

Re: bash feature suggestion, show command RC codes in history

2023-05-03 Thread alex xmb ratchev
On Wed, May 3, 2023, 16:25 Chet Ramey wrote: > On 4/23/23 1:56 PM, Mark Schlegel wrote: > > Bash has a history function, it would be useful if 'history' would show > the exit codes (return codes) from all commands: > > Thanks for the proposal. There have been various suggestions over the years >

Re: Unnecessary bash warning message

2023-05-07 Thread alex xmb ratchev
On Mon, May 8, 2023, 04:07 Hyunho Cho wrote: > ### > > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto > -ffat-lto-objects -fstack-protector-strong -Wformat > -Werror=format-se

Re: Unnecessary bash warning message

2023-05-09 Thread alex xmb ratchev
On Tue, May 9, 2023, 01:50 Robert Elz wrote: > Date:Mon, 8 May 2023 11:13:19 -0400 > From:Chet Ramey > Message-ID: <4c66cc58-27f7-4001-c831-8a2a23264...@case.edu> > > | I see I might need to update the error message to specify it's process > | substitution. > > Y

Re: nounset option: Error message points to the wrong variable when accessing associative arrays

2023-05-10 Thread alex xmb ratchev
On Wed, May 10, 2023, 19:45 Baumann, Moritz wrote: > > Anyway, that is still correct behaviour; the reason why that happens is > > that when you assign you perform an array expansion on a variable that > > is neither a -a nor a -A variable, the variable is treated as a -a > > (indexed array) vari

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
'C ..' ' ..' '| ..' .. i dont get it On Mon, May 15, 2023, 19:35 Chet Ramey wrote: > The latest devel branch push has the initial implementation of `nofork' > command substitution. The excerpt from the info manual describing it is > appended. > > Please test it out, and find the places I missed

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 13:54 Greg Wooledge wrote: > On Fri, May 19, 2023 at 01:36:44PM +0200, alex xmb ratchev wrote: > > 'C ..' > > ' ..' > > '| ..' > > > > .. i dont get it > > Yeah, the wording isn't ideal. I'

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 14:25 alex xmb ratchev wrote: > > > On Fri, May 19, 2023, 13:54 Greg Wooledge wrote: > >> On Fri, May 19, 2023 at 01:36:44PM +0200, alex xmb ratchev wrote: >> > 'C ..' >> > ' ..' >> > '| ..' >&g

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 14:55 Greg Wooledge wrote: > On Fri, May 19, 2023 at 02:25:15PM +0200, alex xmb ratchev wrote: > > On Fri, May 19, 2023, 13:54 Greg Wooledge wrote: > > > > > On Fri, May 19, 2023 at 01:36:44PM +0200, alex xmb r

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
hello .. On Fri, May 19, 2023, 16:29 Chet Ramey wrote: > On 5/18/23 10:14 PM, Dale R. Worley wrote: > > Chet Ramey writes: > >> Bash allows the close brace to be joined to the remaining > >> characters in the word without being followed by a shell metacharacter > >> as a reserved word would usu

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 18:04 Chet Ramey wrote: > On 5/19/23 6:11 AM, Robert Elz wrote: > > Date:Thu, 18 May 2023 22:14:28 -0400 > > From:"Dale R. Worley" > > Message-ID: <874jo9kqyj@hobgoblin.ariadne.com> > > > >| Chet Ramey writes: > >| > Bash allows

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 18:35 alex xmb ratchev wrote: > > > On Fri, May 19, 2023, 18:04 Chet Ramey wrote: > >> On 5/19/23 6:11 AM, Robert Elz wrote: >> > Date:Thu, 18 May 2023 22:14:28 -0400 >> > From:"Dale R. Wo

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
is there a difference between } and ;} / ' }' On Fri, May 19, 2023, 20:43 Robert Elz wrote: > Date:Fri, 19 May 2023 12:03:51 -0400 > From:Chet Ramey > Message-ID: <0a85095a-1665-d936-b4fa-118dd158e...@case.edu> > > > | Maybe, and certainly possible, but a more lik

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 20:43 Robert Elz wrote: > Date:Fri, 19 May 2023 12:03:51 -0400 > From:Chet Ramey > Message-ID: <0a85095a-1665-d936-b4fa-118dd158e...@case.edu> > > > | Maybe, and certainly possible, but a more likely use is just a simple > | assignment to RE

Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 21:11 Greg Wooledge wrote: > On Fri, May 19, 2023 at 06:35:50PM +0200, alex xmb ratchev wrote: > > so that i understand , > > > > var=${ awk ... } > > There's no reason to use this new thing if you're calling awk, because > awk is

Re: Re: nofork command substitution

2023-05-19 Thread alex xmb ratchev
On Fri, May 19, 2023, 22:08 Chet Ramey wrote: > I don't think this ever made it to the list. > > > -- Forwarded message -- > From: Chet Ramey > To: "Ángel" > Cc: chet.ra...@case.edu > Bcc: > Date: Wed, 17 May 2023 11:53:46 -0400 > Subject: Re: nofork command substitution > On 5/

Re: `wait -n` returns 127 when it shouldn't

2023-05-22 Thread alex xmb ratchev
On Mon, May 22, 2023, 07:43 Aleksey Covacevice wrote: > On Thu, May 18, 2023 at 3:07 PM Chet Ramey wrote: > > > > On 5/18/23 7:51 AM, Robert Elz wrote: > > > > > Apparently, in bash, if the code is running in a (shell) loop (like > inside > > > a while, or similar, loop) then each iteration arou

Re: EOF at PS2

2023-05-27 Thread alex xmb ratchev
On Fri, May 26, 2023, 23:45 Chet Ramey wrote: > On 4/26/23 5:38 PM, Grisha Levit wrote: > > A few issues with EOF being received at PS2: > > I finally had a chance to check out the ksh88 behavior on a Solaris 10 VM. > It's pretty bizarre, but it does point to some improvements when ignoreeof > is

Re: inaccurate documentation for [[:ascii:]]

2023-05-30 Thread alex xmb ratchev
does graph mean printable On Tue, May 30, 2023, 14:40 Emanuele Torre wrote: > The documentation for glob character classes is innacurate: > > > Within [ and ], character classes can be specified using the syntax > > [:class:], where class is one of the following classes defined in the > > POSIX

Re: inaccurate documentation for [[:ascii:]]

2023-05-30 Thread alex xmb ratchev
On Tue, May 30, 2023, 14:51 Emanuele Torre wrote: > On Tue, May 30, 2023 at 02:42:46PM +0200, alex xmb ratchev wrote: > > does graph mean printable > > Sort of. [[:print:]] matches all the printable characters > https://en.wikipedia.org/wiki/ASCII#Printable_characters >

Re: enable builtin bugs in bash 5.2

2023-05-30 Thread alex xmb ratchev
On Tue, May 30, 2023, 21:29 Chet Ramey wrote: > On 5/27/23 12:44 PM, Emanuele Torre wrote: > > Since bash 5.2, enable mkdir is equivalent to enable -f mkdir mkdir. > > > > But, if you use the -n flag, and mkdir is not a loaded builtin, it will > > also be equivalent to enable -f mkdir mkdir

Re: enable builtin bugs in bash 5.2

2023-05-30 Thread alex xmb ratchev
On Tue, May 30, 2023, 22:47 Robert Elz wrote: > Date:Tue, 30 May 2023 15:28:57 -0400 > From:Chet Ramey > Message-ID: > > | H. That's not the only option. How about we load it if found but > mark > | it as not enabled? It will still take `enable -d' to delete

Re: enable builtin bugs in bash 5.2

2023-05-30 Thread alex xmb ratchev
On Tue, May 30, 2023, 22:55 alex xmb ratchev wrote: > > > On Tue, May 30, 2023, 22:47 Robert Elz wrote: > >> Date:Tue, 30 May 2023 15:28:57 -0400 >> From:Chet Ramey >> Message-ID: >> >> | H. That's not the

Re: enable builtin bugs in bash 5.2

2023-05-31 Thread alex xmb ratchev
On Wed, May 31, 2023, 16:07 Chet Ramey wrote: > On 5/30/23 4:46 PM, Robert Elz wrote: > > Date:Tue, 30 May 2023 15:28:57 -0400 > > From:Chet Ramey > > Message-ID: > > > >| H. That's not the only option. How about we load it if found > but mark > >| it

Re: enable builtin bugs in bash 5.2

2023-05-31 Thread alex xmb ratchev
On Wed, May 31, 2023, 16:58 Robert Elz wrote: > Date:Wed, 31 May 2023 10:07:07 -0400 > From:Chet Ramey > Message-ID: > > | The documentation can always be changed to match a change in behavior. > > Of course, but you only do that wen the doc is either unclear, or

Re: Performance difference between different versions of bash

2023-06-08 Thread alex xmb ratchev
On Thu, Jun 8, 2023, 14:16 wang yuhang via Bug reports for the GNU Bourne Again SHell wrote: > Hi hi , i made some optional benchmark code it .. doesnt make much sense cause i too lately read / understood about the time echo `date` part i originally when i tried there were weird bugs also one

Re: Performance difference between different versions of bash

2023-06-08 Thread alex xmb ratchev
On Thu, Jun 8, 2023, 21:09 alex xmb ratchev wrote: > > > On Thu, Jun 8, 2023, 14:16 wang yuhang via Bug reports for the GNU Bourne > Again SHell wrote: > >> Hi > > > hi , i made some optional benchmark code > it .. doesnt make much sense cause i too lately r

Re: New array_expand_once option

2023-06-13 Thread alex xmb ratchev
On Tue, Jun 13, 2023, 22:21 Chet Ramey wrote: > The latest push to the devel branch extends the assoc_expand_once > semantics to indexed array variables. This means that a construct > like > > export subscript='$(uname >&2 ; echo 0)' > shopt -s assoc_expand_once > printf -v a["$subscript"] %s hi

Re: New array_expand_once option

2023-06-14 Thread alex xmb ratchev
On Wed, Jun 14, 2023, 15:34 Chet Ramey wrote: > On 6/13/23 7:12 PM, alex xmb ratchev wrote: > > > any word s about [[ -v > > .. ? > > > > Using the assignments above, > > [[ -v a["$subscript"] ]] > > is already an arithmetic expansion error in

Re: New array_expand_once option

2023-06-15 Thread alex xmb ratchev
On Thu, Jun 15, 2023, 15:06 Chet Ramey wrote: > On 6/14/23 5:18 PM, alex xmb ratchev wrote: > > > [[ -v a["$subscript"] ]] > > > > is already an arithmetic expansion error in bash-5.2, but not in > bash-5.1. > > > > > > hello there

Re: `jobs` shows output even when nothing has been started in the background

2023-06-15 Thread alex xmb ratchev
On Thu, Jun 15, 2023, 00:13 Ajeet D'Souza <98aj...@gmail.com> wrote: > Hey Chet, > > Thanks for the quick reply. I have some follow-up questions: > >- Is there an elegant way I can start an external process without it >showing up under jobs, even on affected versions? My current best idea

Re: New array_expand_once option

2023-06-17 Thread alex xmb ratchev
On Thu, Jun 15, 2023, 20:40 alex xmb ratchev wrote: > > > On Thu, Jun 15, 2023, 15:06 Chet Ramey wrote: > >> On 6/14/23 5:18 PM, alex xmb ratchev wrote: >> >> > [[ -v a["$subscript"] ]] >> > a small question about that .. do the quotes mat

Re: New array_expand_once option

2023-06-17 Thread alex xmb ratchev
On Sat, Jun 17, 2023, 14:46 Dennis Williamson wrote: > > > On Sat, Jun 17, 2023, 6:59 AM alex xmb ratchev wrote: > >> On Thu, Jun 15, 2023, 20:40 alex xmb ratchev wrote: >> >> > >> > >> > On Thu, Jun 15, 2023, 15:06 Chet Ramey wrote: &g

Re: Crashing the Linux System

2023-06-17 Thread alex xmb ratchev
On Sat, Jun 17, 2023, 15:06 LitHack wrote: > -- Forwarded message - > From: LitHack > Date: Sat, 17 Jun 2023 at 08:52 > Subject: Crashing the Linux System > To: > > > Running the yes command in command substitution will crash the linux shell. > According to me inside command the

Re: New array_expand_once option

2023-06-17 Thread alex xmb ratchev
On Tue, Jun 13, 2023, 22:21 Chet Ramey wrote: > The latest push to the devel branch extends the assoc_expand_once > semantics to indexed array variables. This means that a construct > like > > export subscript='$(uname >&2 ; echo 0)' > shopt -s assoc_expand_once > printf -v a["$subscript"] %s hi

Re: New array_expand_once option

2023-06-19 Thread alex xmb ratchev
On Mon, Jun 19, 2023, 19:44 Chet Ramey wrote: > On 6/17/23 11:08 AM, alex xmb ratchev wrote: > > > To better describe its functionality, I renamed assoc_expand_once to > > array_expand_once. The old name is still accepted. > > > > > > its an opt that

Re: New array_expand_once option

2023-06-19 Thread alex xmb ratchev
On Mon, Jun 19, 2023, 22:13 Chet Ramey wrote: > On 6/19/23 3:42 PM, alex xmb ratchev wrote: > > > in short , i no [ and no compat .. > > leaving 2 out of 4 answers of u > > What does that mean? > ah oh u answered a bunch in batch just saying [ and compat i dont use l

Re: No form commsub if last token ends with & or ;

2023-06-20 Thread alex xmb ratchev
On Mon, Jun 19, 2023, 20:16 Chet Ramey wrote: > On 6/18/23 4:59 AM, Grisha Levit wrote: > > On Sunday, May 28, 2023, Grisha Levit wrote: > > > >> Missing final `;': > >> > >> "$BASH" --pretty-print <<< $'${ : \;;}' > >> ${ : \; } > >> > > > > The latest set of fixes to this code solves these cas

problem with continuation prompt on newlines with history back

2023-06-23 Thread alex xmb ratchev
hi .. i was trying in termux PS1=' $PWD > ' /data/data/com.termux/files/home PS1=' $PWD > ' /data/data/com.termux/files/home --- 1. i entered with one newline np 2. i pressed up , 1. del ( make the ' away to continue ) and press enter .. the prompt continuation prompt is shown ,

Re: problem with continuation prompt on newlines with history back

2023-06-23 Thread alex xmb ratchev
doesnt pass the \n to subvar greets On Sat, 24 Jun 2023, 03:34 alex xmb ratchev, wrote: > >> hi .. >> i was trying in termux >> >> >> PS1=' $PWD >> > ' >> /data/data/com.termux/files/home >> PS1=' $PWD >> >

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 00:25 Eli Schwartz wrote: > compgen is a useful builtin for inspecting information about the shell > context e.g. in scripts -- a good example of this is compgen -A function > or compgen -A variable. > > But it's not always available depending on how bash is built, which > r

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 11:33 Kerin Millar wrote: > On Mon, 26 Jun 2023 17:09:47 +1000 > Martin D Kealey wrote: > > > Hi Eli > > > > How about using the shell itself to parse the output of "typeset" (an > alias > > for "declare"), but redefining "declare" to do something different. This > is > > a

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 11:51 alex xmb ratchev wrote: > > > On Mon, Jun 26, 2023, 11:33 Kerin Millar wrote: > >> On Mon, 26 Jun 2023 17:09:47 +1000 >> Martin D Kealey wrote: >> >> > Hi Eli >> > >> > How about using the shell itself to par

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 11:55 alex xmb ratchev wrote: > > > On Mon, Jun 26, 2023, 11:51 alex xmb ratchev wrote: > >> >> >> On Mon, Jun 26, 2023, 11:33 Kerin Millar wrote: >> >>> On Mon, 26 Jun 2023 17:09:47 +1000 >>> Martin D Kealey wrote:

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 11:58 Kerin Millar wrote: > On Mon, 26 Jun 2023 11:47:21 +0200 > alex xmb ratchev wrote: > > > On Mon, Jun 26, 2023, 00:25 Eli Schwartz wrote: > > > > > compgen is a useful builtin for inspecting information about the shell > > > co

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 12:01 Kerin Millar wrote: > On Mon, 26 Jun 2023 11:51:58 +0200 > alex xmb ratchev wrote: > > > On Mon, Jun 26, 2023, 11:33 Kerin Millar wrote: > > > > > On Mon, 26 Jun 2023 17:09:47 +1000 > > > Martin D Kealey wrote: > > >

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 12:03 Kerin Millar wrote: > On Mon, 26 Jun 2023 11:55:03 +0200 > alex xmb ratchev wrote: > > > by the way , what does this nonsense code supposed to do > > separate between vars for future list / deletement ? > > Print all declared variable names

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 12:10 Kerin Millar wrote: > On Mon, 26 Jun 2023 12:03:47 +0200 > alex xmb ratchev wrote: > > > On Mon, Jun 26, 2023, 12:01 Kerin Millar wrote: > > > > > On Mon, 26 Jun 2023 11:51:58 +0200 > > > alex xmb ratchev wrote: > >

Re: Enable compgen even when programmable completions are not available?

2023-06-26 Thread alex xmb ratchev
On Mon, Jun 26, 2023, 14:08 Martin D Kealey wrote: > hmm, declare -p used to print an array like > ˋˋˋ > declare -a array='([0]="value" [1]="value")' > ˋˋˋ > At some stage declare -p stopped printing the extra outer quotes, so that > my approach also stops working. > quotes matter to input diffe

Re: Bash Bug

2023-06-26 Thread alex xmb ratchev
if u modify PS1 , u must enclose escape / color codes in literarly \[ and \] eg PS1=$'\[\e[0;1m\]bold\[\e[0m\] ' and the err u say , looks like u didnt make that proper bind cmd On Mon, Jun 26, 2023, 19:15 Kaif Khan wrote: > >

Re: Bash Bug

2023-06-26 Thread alex xmb ratchev
On Tue, Jun 27, 2023, 07:23 alex xmb ratchev wrote: > > > On Tue, Jun 27, 2023, 04:55 Kaif Khan wrote: > >> Thank you for your response, but my bug is rather very simple and not >> complicated. I am attaching a video to explain the bug. >> > whats

Re: Funny behaviour of associative arrays

2023-06-27 Thread alex xmb ratchev
On Tue, Jun 27, 2023, 07:29 n952162 wrote: > Is this correct? > > declare -A l1 > > l1=([a]=b [c]=d) > echo ${!l1[@]} > > l1=($(echo [a]=b [c]=d)) > echo ${!l1[@]} > declare -A "l1=( $( echo [ab]=22 ) )" declare -A "l1+=( name content )" l1+=( third 33 ) declare -p l1 ---

Re: Funny behaviour of associative arrays

2023-06-27 Thread alex xmb ratchev
On Tue, Jun 27, 2023, 11:00 alex xmb ratchev wrote: > > > On Tue, Jun 27, 2023, 07:29 n952162 wrote: > >> Is this correct? >> >> declare -A l1 >> >> l1=([a]=b [c]=d) >> echo ${!l1[@]} >> >> l1=($(echo [a]=b [c]=d)) &

Re: Funny behaviour of associative arrays

2023-06-27 Thread alex xmb ratchev
On Tue, Jun 27, 2023, 07:29 n952162 wrote: > Is this correct? > > declare -A l1 > > l1=([a]=b [c]=d) > echo ${!l1[@]} > > l1=($(echo [a]=b [c]=d)) > echo ${!l1[@]} > > $ bash t4 > c a > [a]=b [c]=d > > If so, why? And how can I assign a list of members to an associative > ar

Re: Enable compgen even when programmable completions are not available?

2023-06-29 Thread alex xmb ratchev
On Fri, Jun 30, 2023, 05:16 Eli Schwartz wrote: > On 6/29/23 4:39 PM, Chet Ramey wrote: > > On 6/25/23 2:38 PM, Eli Schwartz wrote: > >> compgen is a useful builtin for inspecting information about the shell > >> context e.g. in scripts -- a good example of this is compgen -A function > >> or com

Re: maybe a bug in bash?

2023-07-01 Thread alex xmb ratchev
On Fri, Jun 30, 2023, 23:21 Greg Wooledge wrote: > On Sat, Jul 01, 2023 at 05:47:33AM +0900, Dominique Martinet wrote: > > hm, this has the password show up in ps on the box executing ssh; > > depending on the context that can be bad. > > Fair enough. We have no way to judge the OP's risk analys

Re: maybe a bug in bash?

2023-07-01 Thread alex xmb ratchev
On Sat, Jul 1, 2023, 15:37 Greg Wooledge wrote: > On Sat, Jul 01, 2023 at 02:45:16PM +0200, alex xmb ratchev wrote: > > declare -p > > works well for transmitting bash vars around via ssh > > > > ssh foo "$(declare -p vars) > > more code" > >

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 14:41 Robert Elz wrote: > Date:Sun, 2 Jul 2023 21:04:38 -0400 > From:Greg Wooledge > Message-ID: > > | The first assignment is done before the value of "m" is used in the > second > | assignment. > > Note that that is a shell specific featur

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 18:01 Dennis Williamson wrote: > > > On Mon, Jul 3, 2023 at 10:32 AM alex xmb ratchev > wrote: > >> >> i chain assignments , have impression its faster >> >> kre >> > >> > >> > >> > > Tests are b

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 18:22 Dennis Williamson wrote: > > > On Mon, Jul 3, 2023 at 11:11 AM alex xmb ratchev > wrote: > >> >> >> >> thats a like 30% or smth >> enuff for me >> i d be the fool typing nonsensly ; s >> > > Do what you li

Re: +=() can be used to set illegal indices

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 23:25 Chet Ramey wrote: > On 6/30/23 3:09 PM, Emanuele Torre wrote: > > On Fri, Jun 30, 2023 at 12:16:46PM -0400, Chet Ramey wrote: > >>> What I would have expected was something like this: > >>> > >>> $ x=([9223372036854775805]=foo) > >>> $ x+=( {1..5} ); echo "this

Re: +=() can be used to set illegal indices

2023-07-04 Thread alex xmb ratchev
On Tue, Jul 4, 2023, 01:52 Chet Ramey wrote: > On 7/3/23 5:56 PM, alex xmb ratchev wrote: > > > looked into non finite number libs ? > > gawk like .. ? > > bignums? No. intmax_t is enough for the shell. > yea , bignums .. sad .. greets -- > ``The lyf so sho

Re: +=() can be used to set illegal indices

2023-07-04 Thread alex xmb ratchev
On Tue, Jul 4, 2023, 14:01 Greg Wooledge wrote: > On Tue, Jul 04, 2023 at 10:40:26AM +0200, alex xmb ratchev wrote: > > On Tue, Jul 4, 2023, 01:52 Chet Ramey wrote: > > > > > On 7/3/23 5:56 PM, alex xmb ratchev wrote: > > > > > > > looked in

Re: [PATCH] normalization tweaks for macOS

2023-07-18 Thread alex xmb ratchev
i no much here the topic .. just for short .. i found uconv of icu-devtools has more opts has also some transliteration opt just that u may not know it i no pro i still cant achieve what i had to do On Tue, Jul 18, 2023, 12:13 AM Grisha Levit wrote: > On Mon, Jul 17, 2023 at 3:29 PM Chet Ramey

slash appended to tab so its two // at end

2023-07-18 Thread alex xmb ratchev
i in 5.2.15 bash aarch64 termux did $ cp -ap db2.*/ and got db2.i5// db2.i7// // should be / i think greets , xmb

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

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.*/ > > > > >

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: 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.*/ > > > > >

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: problem anomalies , possibly aliases related

2023-07-20 Thread alex xmb ratchev
sorry for possible negative effected texting i d wish to discuss , why aliases are a big gain , and why so my indenting i ve been in #bash and #awk since 200[012] , where such negative english texting like me getting banned there for years , .. i did learn back then , and did , and do answer bash

Re: problem anomalies , possibly aliases related

2023-07-20 Thread alex xmb ratchev
On Thu, Jul 20, 2023, 10:03 AM Grisha Levit wrote: > > > On Thu, Jul 20, 2023, 01:42 alex xmb ratchev wrote: > >> >> >> 2. it says [[ ! -d then ' continue ' .. where is cp >> i call no , not c , ... >> 1. cp missing >> 2. the [[ ! -d

Re: problem anomalies , possibly aliases related

2023-07-20 Thread alex xmb ratchev
the bugfixed version that ran 24m long On Thu, Jul 20, 2023, 10:08 AM alex xmb ratchev wrote: > > > On Thu, Jul 20, 2023, 10:03 AM Grisha Levit wrote: > >> >> >> On Thu, Jul 20, 2023, 01:42 alex xmb ratchev wrote: >> >>> >>> >>>

Re: problem anomalies , possibly aliases related

2023-07-20 Thread alex xmb ratchev
i most dont understand your text story On Thu, Jul 20, 2023, 3:03 PM Martin D Kealey wrote: > > > On Thu, 20 Jul 2023, 18:03 Grisha Levit, wrote: > >> Sounds like you want all the commands in the alias to be executed as a >> group -- so you can just write it as one: >> >> alias bad='{ echo fail

Re: [PATCH] normalization tweaks for macOS

2023-07-20 Thread alex xmb ratchev
On Thu, Jul 20, 2023, 5:55 PM Chet Ramey wrote: > On 7/18/23 1:39 PM, Grisha Levit wrote: > > On Tue, Jul 18, 2023 at 9:55 AM Chet Ramey wrote: > >> Unicode normalization on macOS has always been a pain in the ass. > > > > I can see that! > > > >> This is the basic assumption that drives all the

Re: problem anomalies , possibly aliases related

2023-07-21 Thread alex xmb ratchev
On Thu, Jul 20, 2023, 8:09 PM Greg Wooledge wrote: > On Fri, Jul 21, 2023 at 12:33:07AM +1000, Martin D Kealey wrote: > > C has longjmp, and other languages have exceptions. Non-local break is a > > usable "Bash shaped" analogue of those. Not perfect, sure, but close > enough > > to be useful. (N

Re: problem anomalies , possibly aliases related

2023-07-21 Thread alex xmb ratchev
On Fri, Jul 21, 2023, 1:36 PM Greg Wooledge wrote: > On Fri, Jul 21, 2023 at 01:15:16PM +0200, alex xmb ratchev wrote: > > On Thu, Jul 20, 2023, 8:09 PM Greg Wooledge wrote: > > > On Fri, Jul 21, 2023 at 12:33:07AM +1000, Martin D Kealey wrote: > [...] > > > Well

Re: [PATCH] fix bind -X quoting

2023-07-24 Thread alex xmb ratchev
On Mon, Jul 24, 2023, 7:13 PM Chet Ramey wrote: > On 7/19/23 12:47 PM, Grisha Levit wrote: > > 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

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

2023-07-24 Thread alex xmb ratchev
On Mon, Jul 24, 2023, 7:30 PM Chet Ramey wrote: > On 7/19/23 1: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 avoi

Re: using exec to close a fd in a var crashes bash

2023-08-23 Thread alex xmb ratchev
On Tue, Aug 22, 2023, 21:00 Dale R. Worley wrote: > Is there any way to write a redirection "Redirect the fd whose number is > in $FOO to file /foo/bar?" OK, you can write 'bash -c "..."' and > i think there was a ' duplicate ' directive .. use that assemble a command string however you want.

  1   2   >