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

2025-05-28 Thread Chet Ramey
the partially complete command line. Thanks for the report. This was fixed in the devel branch just after bash-5.2 was released, and the fix is in bash-5.3. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hi

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

2025-05-27 Thread Chet Ramey
ot; to, e.g. "$PATH". Well, sure. It's highly likely that "$PATH" will not be "0", so the test command will succeed, and so on. Note, as others have, that this AND-OR shorthand is not equivalent to if A; then B; else C -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

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

2025-05-22 Thread Chet Ramey
onf.h file for this situation; I'll see if I can fix this there and have mkbuiltins.c include it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.

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

2025-05-22 Thread Chet Ramey
You need a conservative second file for the build system. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.as

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

2025-05-20 Thread Chet Ramey
sn't provide its own implementation of EREs: it uses whatever libc supplies. I assume that's different from whatever `grep -E' uses. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: What is the status of bash-5.3?

2025-05-19 Thread Chet Ramey
documentation and testing cycle. I try to give a release candidate at least a month so distros can build and test. I would expect bash-5.3 to be released this summer. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

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

2025-05-18 Thread Chet Ramey
nd variable error unless the subscript is `@' or `*'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

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

2025-05-17 Thread Chet Ramey
n again. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Cross-Compile - Makefile - Install-strip

2025-05-16 Thread Chet Ramey
le, but could work in some environments. It'd be nice if this implementation could be standardized under the GNU umbrella. I'll see what I can do before bash-5.3 comes out. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita

Re: Brace expansion change on devel

2025-05-16 Thread Chet Ramey
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 file descriptor; new minimal chmod

Re: SourceAv in xparse_dolparen when trying to compare with rvalue

2025-05-16 Thread Chet Ramey
ga, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH] Fix link error on GNU/Hurd.

2025-05-16 Thread Chet Ramey
e craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: SourceAv in xparse_dolparen when trying to compare with rvalue

2025-05-01 Thread Chet Ramey
y. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: SourceAv in rewind_input_string when trying to compare with rvalue

2025-05-01 Thread Chet Ramey
thout-bash-malloc $ make $ cat crash2.txt | ./bash This can still be reproduced after the fix pushed today. Yes; there's nothing in that push that addresses this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' -

Re: $* in here-document

2025-04-28 Thread Chet Ramey
his back in November, 2022, based on https://lists.gnu.org/archive/html/bug-bash/2022-09/msg2.html It came in too late in the bash-5.2 release cycle to be included. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' -

Re: Bug in Bash Autocompletion: Hidden File, ...Hiding-From-You, Autocompleted Without Dot Prefix

2025-04-28 Thread Chet Ramey
vironment. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Bug in Bash Autocompletion: Hidden File, ...Hiding-From-You, Autocompleted Without Dot Prefix

2025-04-25 Thread Chet Ramey
-- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Heap-buffer-overflow in read_token_word() when read element with -1 index

2025-04-23 Thread Chet Ramey
On 4/23/25 1:37 PM, Grisha Levit wrote: On Wed, Apr 23, 2025, 11:40 Chet Ramey wrote: On 4/23/25 11:30 AM, Александр Ушаков wrote: I encountered an issue in Bash and would like to report it. buggyfile.txt is attached to the email. Steps to reproduce $ CC=clang-19 CFLAGS="-fsan

Re: Heap-buffer-overflow in read_token_word() when read element with -1 index

2025-04-23 Thread Chet Ramey
ash --norc --noediting -i I get no asan errors when running that file against the current bash devel branch and bash-5.3-rc1. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: Bash documentation is missing ID anchor

2025-04-22 Thread Chet Ramey
efore @btindex. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: BashPitfall 65, read reading past the delimiter on records ending in truncated characters

2025-04-21 Thread Chet Ramey
On 4/21/25 2:48 AM, Stephane Chazelas wrote: 2025-04-20 17:31:56 -0400, Chet Ramey: [...] This has been fixed since last July, and the fix is in bash-5.3. [...] Thanks, though as Greg says, there seems to be a few more related issues still affecting 5.3. I repost a message sent privately

Re: BashPitfall 65, read reading past the delimiter on records ending in truncated characters

2025-04-21 Thread Chet Ramey
-- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Heap-buffer-overflow in parse_matched_pair when push_delimiter (dstack, ch) macros opens up

2025-04-20 Thread Chet Ramey
- Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Make cd built-in as resilient as mkdir -p built-in

2025-04-14 Thread Chet Ramey
On 4/12/25 3:29 AM, Laurent Lyaudet wrote: Le ven. 11 avr. 2025 à 18:11, Chet Ramey <mailto:chet.ra...@case.edu>> a écrit : On 4/10/25 12:29 PM, Laurent Lyaudet wrote: > Hello :), > > Recently, I noticed during tests that mkdir -p can handle paths beyo

Re: tiny tweak to examples/functions/autoload.v3 (email addresses)

2025-04-14 Thread Chet Ramey
On 4/11/25 7:24 PM, Mark Kennedy wrote: Thanks, I'll update your email address. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhtt

Re: Bash shell uses wrong language

2025-04-14 Thread Chet Ramey
o long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Bash shell uses wrong language

2025-04-14 Thread Chet Ramey
tware Foundation, Inc. This string was left unchanged by the translation team, at least in the po file I shipped with bash-5.2. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: Bash shell uses wrong language

2025-04-14 Thread Chet Ramey
er ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Make cd built-in as resilient as mkdir -p built-in

2025-04-11 Thread Chet Ramey
craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: /dev/tcp feature request...

2025-04-11 Thread Chet Ramey
7;, wouldn't even get to trying the next server. So you would have to take that into account if I add connection timeouts (and even now without them). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates C

Re: /dev/tcp feature request...

2025-04-11 Thread Chet Ramey
#x27;' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: /dev/tcp feature request...

2025-04-10 Thread Chet Ramey
ion: do you think a connection timeout should be considered a redirection error? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: 2.0..devel: `set -u; a=1; echo ${#a[@]}' fails

2025-04-10 Thread Chet Ramey
xpect. OK, it seems reasonable. I'll look at changing this for the next version. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/

Re: Bash skips empty lines when reading history file in multiline mode

2025-04-10 Thread Chet Ramey
blank line? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: 3 updates for 5.3rc1

2025-04-10 Thread Chet Ramey
range. Good catch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Support ksh93 x=${cmd;}

2025-04-09 Thread Chet Ramey
On 4/9/25 9:31 AM, Dan Shelton wrote: On Wed, 9 Apr 2025 at 15:16, Chet Ramey wrote: On 4/9/25 2:09 AM, Cedric Blancher wrote: Good morning! Could bash please support x=${cmd;} alongside x=$(cmd)? I implemented it back in 2023 and it will be in bash-5.3. There was quite a long discussion

Re: Support ksh93 x=${cmd;}

2025-04-09 Thread Chet Ramey
g to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Support ksh93 x=${cmd;}

2025-04-09 Thread Chet Ramey
lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Problem in trap help message

2025-04-08 Thread Chet Ramey
t command in a shell function, [[ conditional commands, and (( arithmetic commands. This is documented in the man page, but I feel like it's overkill to put it in the help text. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'

Bash-5.3-rc1 available

2025-04-08 Thread Chet Ramey
if the application wants to print macro values itself instead of letting readline do it f. rl_reparse_colors: new application-callable function, reparses $LS_COLORS (presumably after the user changes it) g. rl_completion_rewrite_hook: new application-settable function pointer, called to modify the word being completed before comparing it against pathnames from the file system. h. execute-named-command: a new bindable command that reads the name of a readline command from the standard input and executes it. Bound to M-x in emacs mode by default. i. Incremental and non-incremental searches now allow ^V/^Q (or, in the former case, anything bound to quoted-insert) to quote characters in the search string. j. There is a new rl_print_keybinding function that prints the key bindings for a single bindable function specified by name. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: 2.0..devel: `set -u; a=1; echo ${#a[@]}' fails

2025-04-07 Thread Chet Ramey
r change so that expanding ${#a[0]}, ${#a[*]}, and ${#a[@]}, where a is a scalar variable, when nounset is enabled, does not result in an unbound variable error. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrat

Re: Surprising behavior with inline environment variable expansion

2025-04-04 Thread Chet Ramey
On 3/30/25 2:34 AM, Robert Elz wrote: Date:Thu, 27 Mar 2025 17:22:03 -0400 From:Chet Ramey Message-ID: <6da17a73-2aac-4fa5-9fa7-5bfff087d...@case.edu> | The shell should assume that setting a shell variable means the | user wants to modify the s

Re: Surprising behavior with inline environment variable expansion

2025-03-31 Thread Chet Ramey
g to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Surprising behavior with inline environment variable expansion

2025-03-31 Thread Chet Ramey
On 3/31/25 12:52 PM, Andreas Schwab wrote: On Mär 31 2025, Chet Ramey wrote: It's hard to see these as being useful if they're glibc-specific. They are coming from ISO TR 14652 and 30112. OK. And when other systems support them, and they get standardized, it will be time to r

Re: Surprising behavior with inline environment variable expansion

2025-03-29 Thread Chet Ramey
On 3/29/25 12:05 AM, Lawrence Velázquez wrote: On Thu, Mar 27, 2025, at 5:22 PM, Chet Ramey wrote: On 3/26/25 6:29 PM, Robert Elz wrote: LANG is generally just the fallback for categories that haven't been set to something else. For this, assume the LC_ALL had never been set (setting

Re: Surprising behavior with inline environment variable expansion

2025-03-27 Thread Chet Ramey
On 3/26/25 6:29 PM, Robert Elz wrote: Date:Wed, 26 Mar 2025 16:05:57 -0400 From:Chet Ramey Message-ID: | There is a precedence hierarchy associated with locale environment | variables, since setting and unsetting environment variables is under | the

Re: Surprising behavior with inline environment variable expansion

2025-03-26 Thread Chet Ramey
iables, so its value is reflected in all the locale categories. But setting LC_NUMERIC=C sets the environment variable **and** the corresponding locale key Yes, according to the precedence. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, v

Re: Surprising behavior with inline environment variable expansion

2025-03-26 Thread Chet Ramey
#x27;' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Surprising behavior with inline environment variable expansion

2025-03-26 Thread Chet Ramey
lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Surprising behavior with inline environment variable expansion

2025-03-26 Thread Chet Ramey
G=C bash -c 'echo "$LC_NUMERIC"' (blank line output) It's not supposed to; that would be undesirable behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: foo=bar baz=${|...;} cmd segfauls after running ...

2025-03-24 Thread Chet Ramey
two lines of code when setting up the funsub. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Descript

Re: Ctrl+C during ~/.bashrc evaluation leads to unexpected behavior

2025-03-17 Thread Chet Ramey
in your .bashrc. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Heredoc with a multiline delimiter

2025-03-17 Thread Chet Ramey
-- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Heredoc with a multiline delimiter

2025-03-17 Thread Chet Ramey
;a b" You don't. However you could fake it, by including backslashes in the delimiter, which would allow literal newlines, It would not; this is a line continuation. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita br

Re: Bug: please document extended and alternate for loop syntax

2025-03-15 Thread Chet Ramey
;well, what are they?" questions and the just as inevitable "then why aren't they documented?" and you're back where you started. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrate

Re: Bug: please document extended and alternate for loop syntax

2025-03-10 Thread Chet Ramey
e. The thread starts here: https://lists.gnu.org/archive/html/bug-bash/2025-03/msg9.html Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~che

Re: Degenerate case in brace expansion.

2025-03-10 Thread Chet Ramey
.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread Chet Ramey
`Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Cosmetic issue in job control display of suspsended "command" command.

2025-03-04 Thread Chet Ramey
cer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Unexpected $BASH_COMMAND after error in subshell

2025-02-26 Thread Chet Ramey
subshell, instead of the subshell itself. Thanks for the report. The subshell updates BASH_COMMAND, but not the parent. It's an easy change to make. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Che

Re: [sr #111166] ngettext syntax

2025-02-24 Thread Chet Ramey
oes not require that all the leading arguments, from the first to the (N-1)th, are specified in the format string. For example, "%3$s %1$d\n" is an acceptable format operand which evaluates the first and third argument operands but not the second." -- ``The lyf so short, the craft so long

Re: [sr #111166] ngettext syntax

2025-02-24 Thread Chet Ramey
conversion specifier. $ /usr/bin/printf '%3$*.*d\n' 4 2 3 printf: incomplete use of n$ -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.c

Re: [sr #111166] ngettext syntax

2025-02-24 Thread Chet Ramey
-- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [sr #111166] ngettext syntax

2025-02-24 Thread Chet Ramey
ot;should" is less strict than "shall," but someone might still do it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [sr #111166] ngettext syntax

2025-02-24 Thread Chet Ramey
n't think it adds anything. I know ksh93 does it, but ksh93 threw arithmetic evaluation in a bunch of different places before $((...)) came along, and I think arithmetic expansion renders them superfluous. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: [sr #111166] ngettext syntax

2025-02-23 Thread Chet Ramey
ive to some max base from the previous scan through the format string, initializing that base to 0. I had the same idea. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: [sr #111166] ngettext syntax

2025-02-23 Thread Chet Ramey
ake it annoying to do. that format string reuse is simply wrong in the numbered conversion case, no-one really needs that. POSIX chose another direction. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Re: [sr #111166] ngettext syntax

2025-02-21 Thread Chet Ramey
ext. That's why $((...)) is available. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [sr #111166] ngettext syntax

2025-02-21 Thread Chet Ramey
On 2/21/25 10:13 AM, Robert Elz wrote: Date:Fri, 21 Feb 2025 09:08:13 -0500 From:Chet Ramey Message-ID: <59a1d1d0-b6eb-4652-9e77-1fc4c5992...@case.edu> | Given the following, which POSIX says is unspecified: | | printf '%s %3$s %s

Re: bash --pretty-print and pattern

2025-02-21 Thread Chet Ramey
he lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [sr #111166] ngettext syntax

2025-02-21 Thread Chet Ramey
On 2/20/25 11:44 PM, Phi Debian wrote: On Thu, Feb 20, 2025 at 11:41 PM Chet Ramey <mailto:chet.ra...@case.edu>> wrote: A response to the question about printf supporting %n$ conversion specifications I posted to savannah. Thanx @chet, I didn't knew this thread.

Fwd: [sr #111166] ngettext syntax

2025-02-20 Thread Chet Ramey
A response to the question about printf supporting %n$ conversion specifications I posted to savannah. --- Begin Message --- Follow-up Comment #5, sr #66 (group bash): [comment #4 comment #4:] > [comment #3 comment #3:] >> * explicit positional argument selection. Some versions of printf(3)

Re: bash --pretty-print and pattern

2025-02-20 Thread Chet Ramey
t pretty-printing mode doesn't suppress execution until after any startup files are read is to allow a custom startup file to set the shell options you want for printing. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis

Re: [PATCH] Fix serialisation of read-write redirections

2025-02-14 Thread Chet Ramey
`Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: history writes to process substitution but errors reading it

2025-02-14 Thread Chet Ramey
On 2/14/25 9:48 AM, Chet Ramey wrote: I think it's reasonable for the history builtin to report read errors here, something like this: bash: history: /dev/fd/63: read error: Inappropriate file type or format The problem with this is that it errors on /dev/null, which has always worked a

Re: history writes to process substitution but errors reading it

2025-02-14 Thread Chet Ramey
ropriate file type or format -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [Suggestion] Add warning/error when using the tilde expansion in a folder where the tile-named file/folder exists

2025-02-13 Thread Chet Ramey
and a command with a parameter starting with ~ is used (which will produce tilde expansion). Thanks for the suggestion. I'm not inclined to implement it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'

Re: "printf %d ''" should diagnose the empty string

2025-02-13 Thread Chet Ramey
er ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: "printf %d ''" should diagnose the empty string

2025-02-10 Thread Chet Ramey
On 2/10/25 2:24 PM, Phi Debian wrote: On Mon, Feb 10, 2025 at 5:48 PM Chet Ramey <mailto:chet.ra...@case.edu>> wrote There isn't a reward for brevity or obfuscation; say what you mean: isnum2() {         case "$1" in         [-+] | ''

Re: "printf %d ''" should diagnose the empty string

2025-02-10 Thread Chet Ramey
OK *[!0-9]*) return 1;; # non-digit *) return 0;; # OK esac } It obviously doesn't handle 0x constants, but could be changed to. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita br

Re: "printf %d ''" should diagnose the empty string

2025-02-10 Thread Chet Ramey
without redirecting stderr; No, that has nothing to do with BASH_XTRACEFD. and (b) insert into the manual an explicit description of at least one expansion explaining that will reliably result in an empty string being interpreted as numeric zero, so that we can trust that one won&#x

Re: filedescriptor leakage, potential crash

2025-02-10 Thread Chet Ramey
command.h, a simple range check would suffice?” Which led me down a rabbit hole. Why *only* those particular redirections? Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ram

Re: Bug in bash read builtin, info from while read REPLY leaking into separate red -r -p "$1" command in function

2025-02-08 Thread Chet Ramey
. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Patch on shellmath.sh from bash-doc v.5.2.32, r.1.fc41

2025-02-07 Thread Chet Ramey
mailer wrap the lines. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: return [n] documentation.

2025-02-07 Thread Chet Ramey
h its internal links, shines. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: return [n] documentation.

2025-02-07 Thread Chet Ramey
, but most of it is transparent (RETURN, ERR, DEBUG traps, etc.). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature

Re: return [n] documentation.

2025-02-06 Thread Chet Ramey
ng to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: Documentation inconsistency (?)

2025-02-06 Thread Chet Ramey
t null; if the colon is omitted, the operator tests only for existence." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Patch on shellmath.sh from bash-doc v.5.2.32, r.1.fc41

2025-02-05 Thread Chet Ramey
x27;' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)

2025-02-04 Thread Chet Ramey
ne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Documenting Bash’s Tilde Expansion in PATH: A Proposal for Clarity and Compatibility

2025-02-04 Thread Chet Ramey
at the time a command is executed. You should read the previous discussion on this. https://lists.gnu.org/archive/html/bug-bash/2025-01/msg00114.html -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Che

Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)

2025-02-03 Thread Chet Ramey
/local/shell/bash' login shell). Are you telling me that this shell, when run as `sh', behaves differently? Why not show that? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)

2025-02-03 Thread Chet Ramey
ed by the read builtin to support `read -n' while the shell's input is a tty. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~che

Re: bash-5.2.32 fails "make install" on RHEL 9

2025-01-27 Thread Chet Ramey
On 1/25/25 10:44 AM, Dennis Clarke wrote: On 8/26/24 16:29, Chet Ramey wrote: On 8/24/24 11:53 PM, Dennis Clarke via Bug reports for the GNU Bourne Again SHell wrote: This seemed to happen over and over and only during "make install". There are a number of loadable builtins th

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-24 Thread Chet Ramey
sical like that, my guess is more people want the bash behavior than not, as bad an idea as it is. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://ti

Re: Tilde is expanded in $PATH, inconsistent behavior

2025-01-24 Thread Chet Ramey
the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: bash compat* issues?

2025-01-22 Thread Chet Ramey
-- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: bash compat* issues?

2025-01-22 Thread Chet Ramey
' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

Re: 5.3.0-beta: readline mishandles prompt with inivisible characters that wraps around

2025-01-21 Thread Chet Ramey
of the prompt because it has invisible characters. I'll see if there's something that I can do to inhibit that in certain cases. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey,

Re: Suggestion of wording for portion of man page

2025-01-20 Thread Chet Ramey
ation writer. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ OpenPGP_signature.asc Description: OpenPGP digital signature

  1   2   3   4   5   6   7   8   9   10   >