Re: [PATCH v2] tests/array.tests: using grep -v -e instead of egrep

2024-02-20 Thread Chet Ramey
On 2/19/24 10:32 PM, Xiangyu Chen wrote: From: Xiangyu Chen The console ouput lots of egrep warning message, those message causes test case fail in diff stage. According the message, using grep -v -e instead of egrep. Thanks for the report. I'll put in something; it seems my hand is about to

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

2024-02-20 Thread Chet Ramey
On 2/20/24 4:11 AM, Martin D Kealey wrote: So yes please, I'd like "local" to push a new variable definition that inherits nothing from any outer one: not name-ref, not read-only, not array (of any kind), not assignment modifiers (integer, upper-case, lower-case), and above all, not any previo

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Chet Ramey
On 2/20/24 4:35 AM, Grisha Levit wrote: Though a similar test shows that the Readline part of the patch is wrong, and I'm not sure how to solve it, at least without changing existing applications' behavior (and requiring signal setup to happen before rl_initialize or rl_read_init_file are called

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Chet Ramey
On 2/20/24 4:51 AM, Grisha Levit wrote: On Tue, Feb 20, 2024 at 4:35 AM Grisha Levit wrote: Though a similar test shows that the Readline part of the patch is wrong, and I'm not sure how to solve it, at least without changing existing applications' behavior (and requiring signal setup to happe

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Martin D Kealey
On Wed, 21 Feb 2024 at 02:37, Grisha Levit wrote: > sigaction(2) says: > > The affected system calls include open(2), read(2), write(2), > sendto(2), recvfrom(2), sendmsg(2) and recvmsg(2) on a communications > channel or a slow device (such as a terminal, but not a regular file) > >

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-20 Thread Zachary Santer
On Tue, Feb 20, 2024 at 2:38 PM alex xmb sw ratchev wrote: > check if $BASH_SOURCE begins with a / , else prepend $PWD to it > to path of file > source "$( dirname -- "$( realpath --canonicalize-existing -- "${BASH_SOURCE[0]}" )" )\ /common/sourced-file.bash" What I do, anyway. Won't let symlin

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-20 Thread alex xmb sw ratchev
On Tue, Feb 20, 2024, 17:53 Zachary Santer wrote: > On Tue, Feb 20, 2024 at 11:17 AM Chet Ramey wrote: > > > > > BASH_SOURCE and BASH_LINENO are part of the debugger support, and exist > so > > the debugger can create a function call stack. > > > > I've definitely used them to create my own call

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-20 Thread Chet Ramey
On 2/17/24 6:47 PM, Zachary Santer wrote: If you're satisfied with $_ or now $0, then fine, but I would actually expect that to show up as ${BASH_SOURCE[1]} within the ${BASH_ENV} script, which it obviously doesn't. Don't know what ${BASH_LINENO[0]} ought to be in that case. Maybe 0? The way th

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-20 Thread Zachary Santer
On Tue, Feb 20, 2024 at 11:17 AM Chet Ramey wrote: > > BASH_SOURCE and BASH_LINENO are part of the debugger support, and exist so > the debugger can create a function call stack. > > I've definitely used them to create my own call stack. I've seen ${BASH_SOURCE[0]} given as preferable to ${0} for

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Chet Ramey
On 2/20/24 11:37 AM, Grisha Levit wrote: On Tue, Feb 20, 2024 at 9:18 AM Chet Ramey wrote: Well, depending on when the terminal emulator sends the SIGWINCH, this is probably a bug in Dropbox or the File Provider code. Bash installs its SIGWINCH handler with SA_RESTART, and the default disposit

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Grisha Levit
On Tue, Feb 20, 2024 at 9:18 AM Chet Ramey wrote: > > Well, depending on when the terminal emulator sends the SIGWINCH, this is > probably a bug in Dropbox or the File Provider code. Bash installs its > SIGWINCH handler with SA_RESTART, and the default disposition is to > discard, so even if a SIG

Re: Inconsistent treatment of left-hand side of conditional expression where IFS is not its default value

2024-02-20 Thread Chet Ramey
On 2/18/24 5:03 PM, Kerin Millar wrote: Hi, This report stems from the discussion at https://lists.gnu.org/archive/html/help-bash/2024-02/msg00085.html. https://lists.gnu.org/archive/html/help-bash/2024-02/msg00102.html It has to do with ^A appearing in the result of a word expansion in a pl

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Chet Ramey
On 2/20/24 4:35 AM, Grisha Levit wrote: On Mon, Feb 19, 2024 at 5:10 PM Chet Ramey wrote: On 2/7/24 1:33 AM, Grisha Levit wrote: I have some dotfiles symlinked to storage backed by a macOS File Provider extension (e.g. Dropbox): $ realpath ~/.bash_profile /Users/levit/Library/Clo

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

2024-02-20 Thread Koichi Murase
2024年2月20日(火) 18:12 Martin D Kealey : > So yes please, I'd like "local" to push a new variable definition that > inherits nothing from any outer one: not name-ref, not read-only, not array > (of any kind), not assignment modifiers (integer, upper-case, lower-case), > and above all, not any previous

Re: Bug: Ligatures are removed as one character

2024-02-20 Thread Martin D Kealey
It's been a long time since I looked into Unicode, but this is what I remember. Depending on the Unicode normalisation level, backspace is *supposed* to remove a letter and all its associated combining marks. The root problem seems to be that some Arabic letters change from "non-combining" to "co

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Grisha Levit
On Tue, Feb 20, 2024 at 4:35 AM Grisha Levit wrote: > > Though a similar test shows that the Readline part of the patch is wrong, > and I'm not sure how to solve it, at least without changing existing > applications' behavior (and requiring signal setup to happen before > rl_initialize or rl_read_

Re: [PATCH] retry opening startup files on EINTR

2024-02-20 Thread Grisha Levit
On Mon, Feb 19, 2024 at 5:10 PM Chet Ramey wrote: > > On 2/7/24 1:33 AM, Grisha Levit wrote: > > I have some dotfiles symlinked to storage backed by a macOS File > > Provider extension (e.g. Dropbox): > > > > $ realpath ~/.bash_profile > > /Users/levit/Library/CloudStorage/Dropbox/profil

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

2024-02-20 Thread Martin D Kealey
On Sat, 17 Feb 2024 at 02:32, Chet Ramey wrote: > Let's say we take the approach of restricting attribute changes on readonly > variables to export/trace/local. > > Should it be an error to attempt to set other attributes (it already is > with nameref), or should declare silently ignore it? > I