Re: exec redirection is undone if fd (>9) has O_CLOEXEC

2024-02-23 Thread Emanuele Torre
On Sat, Feb 24, 2024 at 02:11:25PM +0900, Koichi Murase wrote: > I have a question. Maybe it's not technically a bug as fd > 9 is > involved, but the resulting behavior appears to be strange. I > received some reports from users in my project and tried to find out > what is happening. This is a

exec redirection is undone if fd (>9) has O_CLOEXEC

2024-02-23 Thread Koichi Murase
I have a question. Maybe it's not technically a bug as fd > 9 is involved, but the resulting behavior appears to be strange. I received some reports from users in my project and tried to find out what is happening. This is a reduced case: #!/usr/bin/env bash enable -f /path/to/lib/bash/fdfl

Re: Bash reference manual: shell parameter expansion examples

2024-02-23 Thread Chet Ramey
On 2/23/24 10:44 AM, James Weigle wrote: Hi! In the Bash reference manual, there are a series of examples of testing if a variable is null or unset: - Under *${parameter:-word}*, the usage is *${var-unset}*. - Under *${parameter:=word}*, the usage is *${var:=DEFAULT}*. - Under *${pa

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS

2024-02-23 Thread Robert Elz
Date:Fri, 23 Feb 2024 10:45:01 -0500 From:Chet Ramey Message-ID: <3544bf1c-e8f6-4358-a281-24bd1be7d...@case.edu> | Do you mean that unset can mark local variables at the same | scope as unset, no, but see below. | that unset can remove local variables at a pre

Bash reference manual: shell parameter expansion examples

2024-02-23 Thread James Weigle
Hi! In the Bash reference manual, there are a series of examples of testing if a variable is null or unset: - Under *${parameter:-word}*, the usage is *${var-unset}*. - Under *${parameter:=word}*, the usage is *${var:=DEFAULT}*. - Under *${parameter:?word}*, the usage is *${var:?var is u

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS

2024-02-23 Thread Chet Ramey
On 2/23/24 8:13 AM, Robert Elz wrote: | even when we claim it's local" and "unset can even mess with the poor | protection afforded by 'local'". I'm guessing you mean bash's bizarre unset definition wrt locals. I consider that to just be a bug. Unsetting a 'local' variable should be iden

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS

2024-02-23 Thread Chet Ramey
On 2/22/24 6:15 PM, Martin D Kealey wrote: On Wed, 21 Feb 2024 at 08:09, Chet Ramey > wrote: On 2/20/24 4:11 AM, Martin D Kealey wrote: > Ideally each function invocation would have its own variable namespace, > only using the global namespace as a fal

Re: Bug: Ligatures are removed as one character

2024-02-23 Thread Chet Ramey
On 2/19/24 9:26 PM, Avid Seeker wrote: When pressing backspace on Arabic ligatures (including characters with diacritics), they are removed as if they are one character. As you might guess, readline doesn't know much about Arabic, per se. In a UTF-8 locale, for example, it knows base characters

Re: It is possible to remove the readonly attribute from {BASH, SHELL}OPTS

2024-02-23 Thread Robert Elz
Date:Fri, 23 Feb 2024 09:15:09 +1000 From:Martin D Kealey Message-ID: | Yes, that's exactly the point, to *avoid* dynamic scoping. I want the | equivalent of Perl's "my", rather than Perl's "local". Lexical scoping does not, that is, cannot, work with the shell