Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-17 Thread Marc Aurèle La France
On Sat, 2024-Feb-17, Zachary Santer wrote: On Sat, Feb 17, 2024, Marc Aurèle La France wrote: Do ... rm -fr GREPME grepme echo '#! /bin/bash\nset' > GREPME "ln" GREPME grepme chmod a+x grepme ... then (case matters) ... BASH_ENV=GREPME ./grepme | fgrep

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-17 Thread Marc Aurèle La France
On Fri, 2024-Feb-16, Grisha Levit wrote: On Fri, Feb 16, 2024, Marc Aurèle La France wrote: On Mon, 2021-Feb-01, Marc Aurèle La France wrote: Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the scr

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-17 Thread Marc Aurèle La France
On Sat, 2024-Feb-17, Zachary Santer wrote: On Fri, Feb 16, 2024, Marc Aurèle La France wrote: On Fri, 2024-Feb-16, Zachary Santer wrote: And you're sure ${BASH_SOURCE[0]} wasn't what you wanted all along? Yes, but that doesn't matter now. At the bottom of my .bashrc fil

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-16 Thread Marc Aurèle La France
On Fri, 2024-Feb-16, Zachary Santer wrote: On Fri, Feb 16, 2024, Marc Aurèle La France wrote: On Mon, 2021-Feb-01, Marc Aurèle La France wrote: Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the scr

Re: Bash 5.1: Make shell_script_filename available to startup files

2024-02-16 Thread Marc Aurèle La France
On Mon, 2021-Feb-01, Marc Aurèle La France wrote: Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the script's filename, so I'm creating a new BASH_SCRIPT variable instead. --- bash

Bash 5.1: Completion bug fix

2021-04-13 Thread Marc Aurèle La France
Fix a bug in attempt_shell_completion() since 4.3-beta that allows the programmable completion code to override a prior decision made by attempt_shell_completion() that command completion is >not< to be used. A test case (the simplest of two possible) follows. Please Reply-To-All. Thanks. Marc.

Re: Bash 5.1: Make shell_script_filename available to startup files

2021-02-08 Thread Marc Aurèle La France
On Tue, 2 Feb 2021, Marc Aurèle La France wrote: On Tue, 2 Feb 2021, Chet Ramey wrote: On Mon, 1 Feb 2021, Marc Aurèle La France wrote: Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the script'

Re: Bash 5.1: Make shell_script_filename available to startup files

2021-02-02 Thread Marc Aurèle La France
On Tue, 2 Feb 2021, Chet Ramey wrote: On Mon, 1 Feb 2021, Marc Aurèle La France wrote: Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the script's filename, so I'm creating a new BASH_

Bash 5.1: Make shell_script_filename available to startup files

2021-02-01 Thread Marc Aurèle La France
Currently, only the script's arguments are passed as positional parameters. For compatibility reasons, $0 cannot be used to also pass the script's filename, so I'm creating a new BASH_SCRIPT variable instead. Below is a heavily simplified test case. The goal is to stop it from asking who you

Bash 5.1: accept loadable build fix

2021-02-01 Thread Marc Aurèle La France
typemax.h states it should be included after config.h, limits.h, stdint.h, and inttypes.h. But, on my system (with glibc 2.32), accept.c ends up including after typemax.h, via the sequence ... accept.c -> loadables.h -> builtins.h -> general.h -> ... resulting in a compile failure. Below is

Bash 5.1: shadow tree build fix

2021-02-01 Thread Marc Aurèle La France
These changes are needed when building bash in a symlink shadow tree of a read-only source tree. While there, deal with a minor typo. Please Reply-To-All. Thanks. Marc. -- --- bash-5.1/Makefile.in +++ devel-5.1/Makefile.in @@ -649,6 +649,7 @@ ${GRAM_H}: y.tab.h y.tab.c: parse.y # -if

Bash 5.1: --disable-multibyte build fix

2021-02-01 Thread Marc Aurèle La France
Mostly typos. Please Reply-To-All. Thanks. Marc. -- --- bash-5.1/lib/glob/glob.c +++ devel-5.1/lib/glob/glob.c @@ -119,10 +119,10 @@ void udequote_pathname PARAMS((char *)); #if HANDLE_MULTIBYTE void wcdequote_pathname PARAMS((wchar_t *)); static void wdequote_pathname PARAMS((char *)); +sta