Re: bash 5.3, rc2, "make install" does not populate the share/man/man1 directory

2025-06-13 Thread Chet Ramey
On 6/13/25 11:32 AM, Stan Marsh wrote: I did: ./configure --prefix=$HOME/local/bash5 Then make and then make install (all of this is done as a non-root user). It created the directory listed above and all the necessary subdirs, including share/man/man1, but left that directory empty. I can't r

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-13 Thread Chet Ramey
On 6/11/25 12:17 PM, Koichi Murase wrote: 2025年6月11日(水) 23:07 Chet Ramey : On 6/3/25 11:57 AM, Koichi Murase wrote: xx. <( and >( can now be used in function names. What is the background of this change? This was added in commit 315095ad, and to the best of my knowledge, an email on the maili

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-13 Thread Chet Ramey
On 6/12/25 2:03 PM, Robert Elz wrote: Date:Thu, 12 Jun 2025 12:26:17 -0400 From:Chet Ramey Message-ID: <86c23b56-de98-431d-be83-727013b65...@case.edu> | This isn't unreasonable, at least for the change to allow quoted characters | in function names. If tha

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Chet Ramey
On 6/13/25 10:23 AM, Todd Zullinger wrote: The issue is stated as: let is very similar to (( - the only difference being let is a builtin (simple command), and (( is a compound command. The arguments to let are therefore subject to all the same expansions and substitutions

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Greg Wooledge
On Fri, Jun 13, 2025 at 08:14:51 -0600, Stan Marsh wrote: > >According to : > > I can't access that URL - get "Bad Gateway" (in at least two different > browsers) Sometimes if there are too many requests all at once, it can get a bit cranky. Wait a

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
On Fri, Jun 13, 2025 at 07:08:21 -0600, Stan Marsh wrote: > BTW, and only tangentially related, "man bash" says that "let" and "(( ))" are > exactly the same, but "shellcheck" thinks otherwise. "shellcheck" says you > should > use "(( ))" and never use "let", but I still (mostly) use "let". And

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Todd Zullinger
Greg Wooledge wrote: > On Fri, Jun 13, 2025 at 07:08:21 -0600, Stan Marsh wrote: >> BTW, and only tangentially related, "man bash" says that >> "let" and "(( ))" are exactly the same, but "shellcheck" >> thinks otherwise. "shellcheck" says you should use "(( >> ))" and never use "let", but I still

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Greg Wooledge
On Fri, Jun 13, 2025 at 07:57:54 -0600, Stan Marsh wrote: > Also, note that if you are running with "set -e" (or "trap ... ERR"), then > having > "let" (or "(( ))") return a non-zero exit status when it happens to evaluate > to zero, > could cause an unexpected script abort. This is why I linked

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
>All of this is intentional, and not a bug. It is possible to be both. But, yes, it reflects a fundamental inconsistency in the C/Unix ecosystem. The fact that in most programming languages (e.g., C, AWK), 0 means false and non-zero means true, but in the shell, it is the opposite. E.g., in AWK

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Greg Wooledge
On Fri, Jun 13, 2025 at 07:08:21 -0600, Stan Marsh wrote: > BTW, and only tangentially related, "man bash" says that "let" and "(( ))" > are exactly > the same, but "shellcheck" thinks otherwise. "shellcheck" says you should > use "(( ))" > and never use "let", but I still (mostly) use "let". T

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Greg Wooledge
On Fri, Jun 13, 2025 at 12:41:16 +0300, Stamatis Mavrogeorgis wrote: > The shorthands "++", "--", "+=1" and "-=1" in bash arithmetic > erroneously return exit code 1 when a variable is either incremented by > "++" or decremented by "--" from 0 or incremented by "+=1" or decremented > by "-=

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
>Description: >The shorthands "++", "--", "+=1" and "-=1" in bash arithmetic >erroneously return exit code 1 when a variable is either incremented by >"++" or decremented by "--" from 0 or incremented by "+=1" or decremented >by "-=1" from -1 and 1 respectively, although the variable valu

Re: Meta: `help cut` doesn't document what -a does

2025-06-13 Thread Stan Marsh
On Wed, Jun 11, 2025 at 10:38:17AM -0400, Chet Ramey wrote: > The business of installing the loadables and > headers on `make install' came later as the result of feature requests. > And Duncan, correctly, replied: >Fine for `make install' to *install* them. But it flies in the face of >convention

Re: Meta: `help cut` doesn't document what -a does

2025-06-12 Thread Oğuz
On Fri, Jun 13, 2025 at 7:02 AM Duncan Roe wrote: > Fine for `make install' to *install* them. But it flies in the face of > convention for `make install' to *build* them - `make' should do that. `make' should only build bash; documentation, loadables, etc. should have dedicated targets. If build

Re: Meta: `help cut` doesn't document what -a does

2025-06-12 Thread Duncan Roe
On Wed, Jun 11, 2025 at 10:38:17AM -0400, Chet Ramey wrote: > The business of installing the loadables and > headers on `make install' came later as the result of feature requests. > Fine for `make install' to *install* them. But it flies in the face of convention for `make install' to *build* them

Re: exec3.sub never finishes with huge argmax

2025-06-12 Thread Chet Ramey
On 6/12/25 9:17 AM, Joel Ebel wrote: On Thu, Jun 12, 2025 at 9:09 AM Joel Ebel > wrote: On Wed, Jun 11, 2025 at 4:03 PM Chet Ramey mailto:chet.ra...@case.edu>> wrote: On 6/7/25 4:42 PM, Joel Ebel via Bug reports for the GNU Bourne Again SHell

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Robert Elz
Date:Thu, 12 Jun 2025 12:26:17 -0400 From:Chet Ramey Message-ID: <86c23b56-de98-431d-be83-727013b65...@case.edu> | This isn't unreasonable, at least for the change to allow quoted characters | in function names. If that also includes any characters which would ne

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Chet Ramey
On 6/12/25 10:11 AM, Robert Elz wrote: It would be better to revert all the changes related to what's allowed in function names, than to go on allowing unquoted operator characters to be embedded in them (before quote removal), that's just broken. This isn't unreasonable, at least for the chan

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Robert Elz
Date:Thu, 12 Jun 2025 09:09:42 -0400 From:Chet Ramey Message-ID: <3ed55e81-00e3-4f91-8fdd-f7fba7bc9...@case.edu> | >| That wouldn't have been backwards compatible, so I didn't add quote | >| removal. | > Really, in what cases? | In every case. If y

Re: exec3.sub never finishes with huge argmax

2025-06-12 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Thu, Jun 12, 2025 at 9:09 AM Joel Ebel wrote: > > > On Wed, Jun 11, 2025 at 4:03 PM Chet Ramey wrote: > >> On 6/7/25 4:42 PM, Joel Ebel via Bug reports for the GNU Bourne Again >> SHell >> wrote: >> >> > I appreciate the effort to make the test run more efficiently and >> faster, >> > and tha

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Chet Ramey
On 6/11/25 7:51 PM, Robert Elz wrote: Date:Wed, 11 Jun 2025 10:09:46 -0400 From:Chet Ramey Message-ID: | That wouldn't have been backwards compatible, so I didn't add quote | removal. Really, in what cases? In every case. If you don't perform quote r

Re: exec3.sub never finishes with huge argmax

2025-06-12 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Wed, Jun 11, 2025 at 4:03 PM Chet Ramey wrote: > On 6/7/25 4:42 PM, Joel Ebel via Bug reports for the GNU Bourne Again > SHell > wrote: > > > I appreciate the effort to make the test run more efficiently and faster, > > and that's probably a good idea, but I think there still needs to be a > w

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Chet Ramey
On 6/11/25 7:39 PM, Robert Elz wrote: Date:Wed, 11 Jun 2025 10:07:37 -0400 From:Chet Ramey Message-ID: <7ef0aaf1-e56e-433e-9d29-4ad232871...@case.edu> | That's the function name. In general, a function name is a WORD that | does not undergo any word expansi

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-12 Thread Robert Elz
Date:Wed, 11 Jun 2025 10:09:46 -0400 From:Chet Ramey Message-ID: | That wouldn't have been backwards compatible, so I didn't add quote | removal. Really, in what cases? Like Koichi Murase showed, I can't find any way to get a quote char (without objection) int

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Robert Elz
Date:Wed, 11 Jun 2025 10:07:37 -0400 From:Chet Ramey Message-ID: <7ef0aaf1-e56e-433e-9d29-4ad232871...@case.edu> | That's the function name. In general, a function name is a WORD that | does not undergo any word expansions, not even quote removal. Not doing expan

Re: exec3.sub never finishes with huge argmax

2025-06-11 Thread Chet Ramey
On 6/7/25 4:42 PM, Joel Ebel via Bug reports for the GNU Bourne Again SHell wrote: I appreciate the effort to make the test run more efficiently and faster, and that's probably a good idea, but I think there still needs to be a way out. I didn't express just how huge our ARG_MAX is. It's 2^62 o

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Koichi Murase
2025年6月11日(水) 23:10 Chet Ramey : > On 6/3/25 4:35 PM, Robert Elz wrote: > > A function name should remain a shell "word" - including being possibly > > partly or fully a quoted word, after all, if it contains operator chars, > > white space, or quoting chars, then it will need to be quoted to be >

Re: static build fails with 5.3 rc2

2025-06-11 Thread Matthias Klose
On 11.06.25 17:14, Chet Ramey wrote: On 6/11/25 5:41 AM, Matthias Klose wrote: This change I'll revert that change, I think, or at least do it a different way that addresses the original report. thank you. so maybe that should be a proper autoconf check to see if these are defined in some o

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Koichi Murase
2025年6月11日(水) 23:07 Chet Ramey : > On 6/3/25 11:57 AM, Koichi Murase wrote: > >> xx. <( and >( can now be used in function names. > > > > What is the background of this change? This was added in commit > > 315095ad, and to the best of my knowledge, an email on the mailing > > list in the same perio

Re: static build fails with 5.3 rc2

2025-06-11 Thread Chet Ramey
On 6/11/25 5:41 AM, Matthias Klose wrote: This change I'll revert that change, I think, or at least do it a different way that addresses the original report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTe

Re: [ PATCH ] NEWS: Make it clear that fltexpr is a *loadable* builtin

2025-06-11 Thread Chet Ramey
On 6/10/25 1:37 AM, Duncan Roe wrote: Hi NEWS announces the new fltexpr builtin but doesn't mention you have to enable it. Reasonable. BTW, fltexpr is so much closer to let than to expr, wouldn't it be better called letflt? (Not fltlet - that sounds like a baby flt :) There was a contribut

Re: Meta: `help cut` doesn't document what -a does

2025-06-11 Thread Chet Ramey
On 6/6/25 11:43 PM, Duncan Roe wrote: On Fri, Jun 06, 2025 at 10:27:56AM -0400, Chet Ramey wrote: They're always built and installed when you use `make install'. The problem, of course, is users (some) or distros (all) who don't use a ^^^ Slac

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Andreas Schwab
On Jun 11 2025, Chet Ramey wrote: >> Bash 5.3 >> interprets the bare <( and >( as an introducer of process >> substitutions, and the defined function has the source code of the >> parsed process substitution. >>$ bash-devel -c '<(echo hello) () { echo hello; }; declare -F' >>declare -f <(e

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Chet Ramey
On 6/3/25 4:35 PM, Robert Elz wrote: A function name should remain a shell "word" - including being possibly partly or fully a quoted word, after all, if it contains operator chars, white space, or quoting chars, then it will need to be quoted to be invoked, it seems eminently sensible to requir

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-11 Thread Chet Ramey
On 6/3/25 11:57 AM, Koichi Murase wrote: xx. <( and >( can now be used in function names. What is the background of this change? This was added in commit 315095ad, and to the best of my knowledge, an email on the mailing list in the same period and related to this change would be Ref. [1] from

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-11 Thread Chet Ramey
On 6/10/25 6:54 PM, Robert Elz wrote: ps: in general, usually, mktemp() isn't the best interface to use, there are race conditions, but whether that matters depends upon just what it is being used for, Sometimes you need to generate a name for a file system object that isn't a regular file (or

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-11 Thread Chet Ramey
On 6/10/25 11:29 AM, Oğuz wrote: On Tuesday, June 10, 2025, Stan Marsh wrote: This is not an answer. This is just someone blowing off steam. This came up a few times and the answer is always along the lines of "it works fine, ignore the warning". Here's a link to a recent discussion about

Re: static build fails with 5.3 rc2

2025-06-11 Thread Greg Wooledge
On Wed, Jun 11, 2025 at 11:41:30 +0200, Matthias Klose wrote: > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libtinfo.a(lib_termcap.o):(.bss+0 > x8): multiple definition of `UP'; > ./lib/readline/libreadline.a(terminal.o):/usr/include/termcap.h:56: fir > st defined her

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Robert Elz
Date:Tue, 10 Jun 2025 18:29:00 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: The original response was fine. | This came up a few times and the answer is always along the lines of "it | works fine, ignore the warning". And beyond that, it isn't bash that has cha

Re: There's no way to declare a function local to another function.

2025-06-10 Thread Robert Elz
Date:Tue, 10 Jun 2025 17:34:44 -0400 From:Zachary Santer Message-ID: | Functions can be declared inside of other functions, so I thought | doing the following was pretty slick: Function definitions aren't declarations in any sense similar to other programming l

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Stan Marsh
Somebody flitted: > Nah This is not an answer. This is just someone blowing off steam. = Please do not send me replies to my posts on the list. I always read the replies via the web archive, so CC'ing to me is unnec

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Oğuz
On Tuesday, June 10, 2025, Stan Marsh wrote: > > Should I be concerned about the warning? > Nah -- Oğuz

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Oğuz
On Tuesday, June 10, 2025, Stan Marsh wrote: > > This is not an answer. This is just someone blowing off steam. > This came up a few times and the answer is always along the lines of "it works fine, ignore the warning". Here's a link to a recent discussion about it: https://lists.gnu.org/archive

Re: exec3.sub never finishes with huge argmax

2025-06-07 Thread Lawrence Velázquez
On Sat, Jun 7, 2025, at 12:55 PM, Martin D Kealey wrote: > However there might be some objections to relying on the printf built-in, > since in theory Bash could be built without it, in which case I suggest: > > [...] > > +for (( m = n = argmax / ${#argmax} + 1 ; o = m & m-1 ; m = o )) do :; done >

Re: exec3.sub never finishes with huge argmax

2025-06-07 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Sat, Jun 7, 2025 at 12:55 PM Martin D Kealey wrote: > Hi Joel > > > On Sun, 8 Jun 2025 at 00:08, Joel Ebel via Bug reports for the GNU Bourne > Again SHell wrote: > >> This is mostly an FYI, as I don't think our ridiculous environment needs >> to >> be supported, but the E2BIG test in exec3.s

Re: exec3.sub never finishes with huge argmax

2025-06-07 Thread Martin D Kealey
Hi Joel On Sun, 8 Jun 2025 at 00:08, Joel Ebel via Bug reports for the GNU Bourne Again SHell wrote: > This is mostly an FYI, as I don't think our ridiculous environment needs to > be supported, but the E2BIG test in exec3.sub never finishes in our testing > environment due to ARG_MAX being set

Re: Meta: `help cut` doesn't document what -a does

2025-06-06 Thread Duncan Roe
On Fri, Jun 06, 2025 at 10:27:56AM -0400, Chet Ramey wrote: > > They're always built and installed when you use `make install'. The > problem, of course, is users (some) or distros (all) who don't use a ^^^ Slackware does > simple `make install', bu

Re: Meta: `help cut` doesn't document what -a does

2025-06-06 Thread Lawrence Velázquez
On Fri, Jun 6, 2025, at 9:29 AM, Stan Marsh wrote: > I.e., yes, I get the theoretical reasons, but it generates confusion > for the user > > [...] > > Of course, > you still have to "enable" them in your script or shell in order to > actually use them. Exactly, you have to explicitly opt into us

Re: `help cut` doesn't document what -a does

2025-06-06 Thread Chet Ramey
On 6/6/25 12:21 AM, Martin D Kealey wrote: On Thu, 5 Jun 2025 at 20:22, Duncan Roe wrote: On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote: Is it useful to combine multiple selected fields (-f) into one space- separated field so `cut' can put the selected portions of each line into

Re: Meta: `help cut` doesn't document what -a does

2025-06-06 Thread Chet Ramey
On 6/6/25 9:29 AM, Stan Marsh wrote: It seems to me they should all be compiled and installed - all the time. Of course, you still have to "enable" them in your script or shell in order to actually use them. They're always built and installed when you use `make install'. The problem, of cou

Re: `help cut` doesn't document what -a does

2025-06-06 Thread microsuxx
++ On Fri, Jun 6, 2025, 1:10 PM Greg Wooledge wrote: > On Fri, Jun 06, 2025 at 14:19:33 +1000, Duncan Roe wrote: > > If one is building bash from source, then (most of) the loadable builtins > > are built and installed (at least since bash 4.4). > > That hasn't been my experience. "./configure"

Re: `help cut` doesn't document what -a does

2025-06-06 Thread Greg Wooledge
On Fri, Jun 06, 2025 at 14:19:33 +1000, Duncan Roe wrote: > If one is building bash from source, then (most of) the loadable builtins > are built and installed (at least since bash 4.4). That hasn't been my experience. "./configure" followed by "make" puts a "bash" executable file in the top-leve

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Martin D Kealey
On Thu, 5 Jun 2025 at 20:22, Duncan Roe wrote: > On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote: > > Is it useful to combine multiple selected fields (-f) into one space- > > separated field so `cut' can put the selected portions of each line into > > a corresponding array element? >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 11:12:43PM -0400, Greg Wooledge wrote: > On Fri, Jun 06, 2025 at 12:55:34 +1000, Duncan Roe wrote: > > On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > > > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > > > i installed bash dev , but there is no

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Greg Wooledge
On Fri, Jun 06, 2025 at 12:55:34 +1000, Duncan Roe wrote: > On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > > i installed bash dev , but there is no `help cut` > > > > It's a "loadable builtin". You have to build those

Re: `help cut` doesn`t document what -a does

2025-06-05 Thread Lawrence Velázquez
On Thu, Jun 5, 2025, at 8:37 AM, Stan Marsh wrote: > Actually, I am not too fond of the habit of having builtins (particularly > those supplied as part of the distribution) with the same name as well-known > Unix commands. It allows for potential drop-in replacement if the external commands are un

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 06:55:55AM -0400, Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. > `mak

Re: lcut query

2025-06-05 Thread Duncan Roe
On Thu, Jun 05, 2025 at 01:39:24PM -0400, Chet Ramey wrote: > On 6/5/25 10:27 AM, Chet Ramey wrote: > > On 6/5/25 6:41 AM, Duncan Roe wrote: > > > Hi Chet, > > > > > > `help lcut` implies to me that columns specified -b or -c should go to > > > separate elements of ARRAY (unlike what cut does), but

Re: lcut query

2025-06-05 Thread Chet Ramey
On 6/5/25 10:27 AM, Chet Ramey wrote: On 6/5/25 6:41 AM, Duncan Roe wrote: Hi Chet, `help lcut` implies to me that columns specified -b or -c should go to separate elements of ARRAY (unlike what cut does), but they do not. Thanks, I'll take a look. I haven't played with `lcut' in a long time;

Re: lcut query

2025-06-05 Thread Chet Ramey
On 6/5/25 6:41 AM, Duncan Roe wrote: Hi Chet, `help lcut` implies to me that columns specified -b or -c should go to separate elements of ARRAY (unlike what cut does), but they do not. Thanks, I'll take a look. I haven't played with `lcut' in a long time; that's why it's not in the makefile.

Re: `help cut` doesn`t document what -a does

2025-06-05 Thread Stan Marsh
On Thu, Jun 5, 2025, 12:56 PM Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. It was far fro

Re: `help cut` doesn't document what -a does

2025-06-05 Thread microsuxx
thxx , ++ On Thu, Jun 5, 2025, 12:56 PM Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. > >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Greg Wooledge
On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > i installed bash dev , but there is no `help cut` It's a "loadable builtin". You have to build those, install them, and then load the "cut" builtin explicitly.

Re: `help cut` doesn't document what -a does

2025-06-05 Thread microsuxx
i installed bash dev , but there is no `help cut` On Wed, Jun 4, 2025, 3:43 PM Chet Ramey wrote: > On 6/2/25 5:58 AM, Duncan Roe wrote: > > Hi, > > > > `cut -a ARRAY ...` puts its last line of output in ARRAY[0] and discards > any > > other elements ARRAY used to have. I tried 3 alternatives: >

Re: `help cut` doesn't document what -a does

2025-06-05 Thread Duncan Roe
On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote: > On 6/2/25 5:58 AM, Duncan Roe wrote: > > Hi, > > > > `cut -a ARRAY ...` puts its last line of output in ARRAY[0] and discards any > > other elements ARRAY used to have. I tried 3 alternatives: > > Thanks for the report. Yes, sometimes ma

Re: Duplicate symbols

2025-06-04 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Wed, Jun 4, 2025 at 3:27 PM Chet Ramey wrote: > On 6/4/25 3:08 PM, Joel Ebel wrote: > > > > > > On Wed, Jun 4, 2025 at 3:00 PM Chet Ramey > > wrote: > > > > On 6/4/25 2:45 PM, Joel Ebel via Bug reports for the GNU Bourne Again > > SHell > > wrote: > >

Re: Duplicate symbols

2025-06-04 Thread Chet Ramey
On 6/4/25 3:08 PM, Joel Ebel wrote: On Wed, Jun 4, 2025 at 3:00 PM Chet Ramey > wrote: On 6/4/25 2:45 PM, Joel Ebel via Bug reports for the GNU Bourne Again SHell wrote: > Hi, > > I'm able to build bash 5.3-rc2 with dynamic linking, but i

Re: Duplicate symbols

2025-06-04 Thread Joel Ebel via Bug reports for the GNU Bourne Again SHell
On Wed, Jun 4, 2025 at 3:00 PM Chet Ramey wrote: > On 6/4/25 2:45 PM, Joel Ebel via Bug reports for the GNU Bourne Again > SHell > wrote: > > Hi, > > > > I'm able to build bash 5.3-rc2 with dynamic linking, but if I configure > it > > with --enable-static-link, the build is unable to complete. I'

Re: Duplicate symbols

2025-06-04 Thread Chet Ramey
On 6/4/25 2:45 PM, Joel Ebel via Bug reports for the GNU Bourne Again SHell wrote: Hi, I'm able to build bash 5.3-rc2 with dynamic linking, but if I configure it with --enable-static-link, the build is unable to complete. I'm building with clang, and there are three conflicts between terminal.c

Re: Questions on the behavior of CTLR+C and trap when job control is enabled/disabled

2025-06-04 Thread Chet Ramey
On 6/4/25 1:14 PM, Oğuz wrote: On Wed, Jun 4, 2025 at 5:09 PM Chet Ramey wrote: You are running this with job control enabled, the shell doesn't receive the SIGINT, the shell notices that `sleep' exited due to SIGINT and interrupts the `source' (since that is what most people want -- bash behav

Re: Questions on the behavior of CTLR+C and trap when job control is enabled/disabled

2025-06-04 Thread Oğuz
On Wed, Jun 4, 2025 at 5:09 PM Chet Ramey wrote: > You are running this with job control enabled, the shell doesn't receive > the SIGINT, the shell notices that `sleep' exited due to SIGINT and > interrupts the `source' (since that is what most people want -- bash > behaves more like a non-interac

Re: '\a' and '\r' escape sequence in internationalized messages

2025-06-04 Thread Chet Ramey
On 6/3/25 2:12 PM, Rafael Fontenelle wrote: Hi all, msgcat from GNU Gettext package complains of the existence of '\a' and '\r' in the message catalogs (a.k.a PO files) as part of the source messages. Thanks for the report. These strings have been in there for decades with no ill effects, so I

Re: Questions on the behavior of CTLR+C and trap when job control is enabled/disabled

2025-06-04 Thread Chet Ramey
On 6/3/25 7:41 AM, Grégory Pakosz wrote: Hello all, I'm using Bash 5.2 on macOS: - bash-5.2$ bash -version GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin23.4.0) Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: `help cut` doesn't document what -a does

2025-06-04 Thread Chet Ramey
On 6/2/25 5:58 AM, Duncan Roe wrote: Hi, `cut -a ARRAY ...` puts its last line of output in ARRAY[0] and discards any other elements ARRAY used to have. I tried 3 alternatives: Thanks for the report. Yes, sometimes marrying the multiple-line-oriented output of a tool like `cut' to one-dimensio

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-03 Thread Koichi Murase
2025年6月4日(水) 0:57 Koichi Murase : > [...]. If it was > implemented after Ref. [1], « '<(echo hello)' () { echo hello; } » > should have been supported but not « <(echo hello) () { echo hello; > }.». I realized that « '<(echo hello)' () { ...; } » is actually supported in Bash 5.3, but the behavior

Re: 5.3: Why is <(cmd) allowed in func names of func defs?

2025-06-03 Thread Robert Elz
Date:Wed, 4 Jun 2025 00:57:15 +0900 From:Koichi Murase Message-ID: | > xx. <( and >( can now be used in function names. | | What is the background of this change? I think I agree with the point here -- while I strongly believe that almost anything should be p

Re: Message "You have new mail ..." interrupts programmable completion

2025-06-02 Thread Troy Loveday
On Wed, May 28, 2025 at 04:46:51PM -0400, Chet Ramey wrote: > > On 5/25/25 5:06 PM, Troy Loveday wrote: > > > Bash Version: 5.2 > > Patch Level: 15 > > Release Status: release > > > > Description: > > If MAILPATH and MAILCHECK are set to enable mail notification, then > > wh

Re: Brace expansion change on devel

2025-06-01 Thread Sam James
Chet Ramey writes: > On 5/10/25 11:18 AM, Sam James wrote: >> Hi, >> Since the following commit on devel >>commit c3ca11424d2ae66cafa2f931b008dfb728e209a5 >>Author: Chet Ramey >>Date: Wed Feb 12 11:18:16 2025 -0500 >>fix issue with redirections to bash input fil

Re: Tilde expansion in PATH in POSIX-Mode

2025-05-30 Thread Martin Schulte
Hello Lawrence! Am Fri, 30 May 2025 04:53:06 -0400 schrieb Lawrence Velázquez : > Your example commands demonstrate something else. The command > > PATH=~/foo:~/bar > > has always assigned a value like '/myhome/foo:/myhome/bar', POSIX > mode or not. This is broken in bash 5.1 POSIX mode

Re: Tilde expansion in PATH in POSIX-Mode

2025-05-30 Thread Lawrence Velázquez
On Fri, May 30, 2025, at 3:36 AM, Martin Schulte wrote: > https://www.gnu.org/software/bash/manual/bash.html#Bash-POSIX-Mode says: > > 19. Literal tildes that appear as the first character in elements of > the PATH variable are not expanded as described above under Tilde > Expansion. > > Is this

Re: Tilde expansion in PATH in POSIX-Mode

2025-05-30 Thread Léa Gris
Le 30/05/2025 à 09:36, Martin Schulte écrivait : Hello, https://www.gnu.org/software/bash/manual/bash.html#Bash-POSIX-Mode says: 19. Literal tildes that appear as the first character in elements of the PATH variable are not expanded as described above under Tilde Expansion. Is this no longer

Re: Message "You have new mail ..." interrupts programmable completion

2025-05-28 Thread Chet Ramey
On 5/25/25 5:06 PM, Troy Loveday wrote: Bash Version: 5.2 Patch Level: 15 Release Status: release Description: If MAILPATH and MAILCHECK are set to enable mail notification, then when activating programmable completion, the mail notification message will interrupt the

Re: grouping via {} fails after "test $PIPESTATUS"

2025-05-27 Thread Chet Ramey
On 5/24/25 10:43 AM, Steve Newcomb wrote: Bash Version: 5.2 Patch Level: 15 Release Status: release Description: In the following script, #!/bin/bash true && {     echo here 1     test "$PIPESTATUS" "!=" "0"     #echo here 2 } || {     echo here 3 } The output is: here 1 here 3   ("here 3

Re: combination of source and && does not result in current alias to be expanded

2025-05-24 Thread Lawrence Velázquez
On Sat, May 24, 2025, at 4:47 PM, Greg Wooledge wrote: > On Sat, May 24, 2025 at 15:00:21 -0500, Bob Mroczka wrote: >>    #!/bin/bash >>    set -o pipefail >>    shopt -s expand_aliases >>    alias ub='echo hi' >>    echo "alias ub='echo bye'" >~/.alias >>    cat ~/.alias >>    source ~/.alias && u

Re: combination of source and && does not result in current alias to be expanded

2025-05-24 Thread Greg Wooledge
On Sat, May 24, 2025 at 15:00:21 -0500, Bob Mroczka wrote: >    #!/bin/bash >    set -o pipefail >    shopt -s expand_aliases >    alias ub='echo hi' >    echo "alias ub='echo bye'" >~/.alias >    cat ~/.alias >    source ~/.alias && ub >    ub I believe you've run into the issue described in this

Re: grouping via {} fails after "test $PIPESTATUS"

2025-05-24 Thread microsuxx
true && { false true } || echo no On Sat, May 24, 2025, 4:58 PM Greg Wooledge wrote: > On Sat, May 24, 2025 at 10:43:39 -0400, Steve Newcomb wrote: > > true && { > > echo here 1 > > test "$PIPESTATUS" "!=" "0" > > #echo here 2 > > } || { > > echo here 3 > > } > > Don't do that.

Re: grouping via {} fails after "test $PIPESTATUS"

2025-05-24 Thread Greg Wooledge
On Sat, May 24, 2025 at 10:43:39 -0400, Steve Newcomb wrote: > true && { >     echo here 1 >     test "$PIPESTATUS" "!=" "0" >     #echo here 2 > } || { >     echo here 3 > } Don't do that. && || is NOT a substitute for if. They do not have the sa

Re: Weird -s test behavior

2025-05-23 Thread Grisha Levit
On Fri, May 23, 2025, 17:17 Stephen Leaf wrote: > > #!/bin/bash > TMPFILE=$(mktemp /tmp/tmp.) > for a in this is a test; do > if [ $a == 'a' ]; then > >&2 echo b > fi > done 2> >(echo "test!"> "$TMPFILE") > The process substitution is asynchronous, so the writ

Re: [PATCH] bash-5.3-rc1 FTBFS when cross compiling with gcc-15

2025-05-22 Thread Chet Ramey
On 5/21/25 5:02 PM, Bruce Dubbs wrote: In linuxfromscratch we do a preliminary build of bash in order to run it later in a chroot environment without any dependencies from the host system: ./configure --prefix=/usr   \     --build=x86_64-pc-linux-gnu \     --host=

Re: [PATCH] bash-5.3-rc1 FTBFS when cross compiling with gcc-15

2025-05-22 Thread Chet Ramey
On 5/22/25 12:48 AM, Oğuz wrote: On Thursday, May 22, 2025, Bruce Dubbs wrote: with cstd-23 'bool' is a keyword This is something the configure script should check. Otherwise why have one? When you are cross-compiling, config.h is for the target system, not the build system. You need a cons

Re: [PATCH] bash-5.3-rc1 FTBFS when cross compiling with gcc-15

2025-05-21 Thread Oğuz
On Thursday, May 22, 2025, Bruce Dubbs wrote: > with cstd-23 'bool' is a keyword This is something the configure script should check. Otherwise why have one? -- Oğuz

Re: Difference in POSIX regular expression for bash's '=~' operator and POSIXLY_CORRECT grep -E

2025-05-20 Thread FunnyMan Computer
to say the least to see the get an idea in differences on ERE's, and at the very least I'll make sure to set my LC_CTYPE to C from now on.. From: Chet Ramey Sent: Tuesday, May 20, 2025 9:59 PM To: FunnyMan Computer ; bug-bash@gnu.org Cc: chet.ra...@

Re: Difference in POSIX regular expression for bash's '=~' operator and POSIXLY_CORRECT grep -E

2025-05-20 Thread Wiley Young
> > For accuracy, under POSIX, `grep` indeed is required to always print whole lines, however GNU `grep` has... -o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. ...and BSD `grep` has...

Re: Difference in POSIX regular expression for bash's '=~' operator and POSIXLY_CORRECT grep -E

2025-05-20 Thread Andreas Schwab
On Mai 20 2025, FunnyMan Computer wrote: > In both cases, ${BASH_REMATCH[1]} should also have results stored. Why? There are no subexpression in your regexps. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for

Re: Difference in POSIX regular expression for bash's '=~' operator and POSIXLY_CORRECT grep -E

2025-05-20 Thread Greg Wooledge
On Tue, May 20, 2025 at 19:08:10 +, FunnyMan Computer wrote: > I failed multiple times on getting similar results to what I was > expecting from using grep just using the [a-z] and [a-z]+ classes - > expecting multiple results from $BASH_REMATCH but it's only picking >

Re: Difference in POSIX regular expression for bash's '=~' operator and POSIXLY_CORRECT grep -E

2025-05-20 Thread Chet Ramey
On 5/20/25 3:08 PM, FunnyMan Computer wrote: Bash Version: 5.2 Patch Level: 37 Release Status: release Description:   Bash's '=~' extended POSIX regex seems to behave very different to the way grep's -E flag seems to deal with regular expressions. Bash doesn't provide its own impleme

Re: What is the status of bash-5.3?

2025-05-19 Thread Chet Ramey
On 5/16/25 10:52 PM, Bruce Dubbs wrote: We have looked at bash-5.3-rc1 which was released om April 8th and that does build with gcc-15.  Can you give us an idea when the stable bash-5.3 will be released? I will release the second release candidate of bash-5.3 as soon as I can go through the d

Re: ${subscriptref} triggers nounset, but $subscriptref does not

2025-05-18 Thread Chet Ramey
On 5/14/25 8:26 PM, Emanuele Torre wrote: For example: $ # a[0] is not set, but no error $ bash -uc 'a=() k=; declare -n r=a[k]; : "$r"; echo ok' ok $ # a[0] is not set, error $ bash -uc 'a=() k=; declare -n r=a[k]; : "${r}"; echo ok' bash: line 1: r: unbound variab

Re: Bash does not complete the filename once the situation becomes singular

2025-05-17 Thread Chet Ramey
On 5/12/25 8:04 PM, Adam Purkrt wrote: GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu) OS: Gentoo Linux Originally met this while the download of iso file in firefox was nearing completion, and I was preparing myself to move the downloaded foobar.iso file elsewhere. I opened terminal

Re: What is the status of bash-5.3?

2025-05-17 Thread Todd Zullinger
Bruce Dubbs wrote: > At the linuxfromscratch project, we document for users how to build a > relatively complete Linux system from source code. When we do this we > consider bash to be one of the most important packages in the system. > > https://www.linuxfromscratch.org/lfs/view/stable/ > > O

  1   2   3   4   5   6   7   8   9   10   >