Re: readonly inconsistency with arrays

2024-06-04 Thread Chet Ramey
] That it might try to anyway is likely unintended. No, that's wrong. readonly/export are declaration utilities, and take assignment statements as arguments. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: readonly inconsistency with arrays

2024-06-04 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: [PATCH] cond expr: cleanup on errors

2024-06-04 Thread Chet Ramey
On 6/3/24 7:30 PM, Grisha Levit wrote: On Mon, Jun 3, 2024 at 3:53 PM Chet Ramey wrote: On 5/31/24 5:07 PM, Grisha Levit wrote: Two minor leak fixes for conditional command error conditions: If a WORD token is read when COND_AND, COND_OR, COND_END, or a binary operator are expected

Re: [PATCH] fix uneccesary copy of function bodies for BASH_SOURCE

2024-06-04 Thread Chet Ramey
On 6/4/24 2:10 AM, konsolebox wrote: I haven't looked at this but it will keep lazy functions safe to implement right? Yes. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: [PATCH] cond expr: cleanup on errors

2024-06-03 Thread Chet Ramey
COMMAND is > leaked. Thanks for the report. These are interactive errors only, since a syntax error in a compound command causes the shell to exit. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: [PATCH] expand_word_internal: fix leak with W_NOSPLIT2

2024-06-03 Thread Chet Ramey
On 5/31/24 6:55 PM, Grisha Levit wrote: Free temporary list allocated when exapnding `$@' in bash -c 'IFS=:; : ${_+$@}' _ X Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

Re: [PATCH] coproc: do not leak name

2024-06-03 Thread Chet Ramey
On 5/31/24 5:32 PM, Grisha Levit wrote: When a named coproc is created, the name string and associated WORD_DESC are leaked. Thanks for the report. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

Re: [PATCH] fix uneccesary copy of function bodies for BASH_SOURCE

2024-06-03 Thread Chet Ramey
side effects, even in pretty-print mode, so we'll try it. 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

Re: [bug #65827] Cross-compilation fails with gcc 14.1.0

2024-06-03 Thread Chet Ramey
o 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: read reads from stale buffer after interrupt

2024-05-31 Thread Chet Ramey
On 5/31/24 11:57 AM, Oğuz wrote: On Friday, May 31, 2024, Chet Ramey <mailto:chet.ra...@case.edu>> wrote: Thanks for the report. Since this occurs when read(2) returns a partial buffer on an interrupt, I think we can handle it in read_builtin(). Okay, handle how though? Leave

Re: [PATCH] bind_assoc_variable: free key if cannot assign

2024-05-31 Thread Chet Ramey
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: read reads from stale buffer after interrupt

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

Re: [PATCH] read: free ifs_chars

2024-05-30 Thread Chet Ramey
On 5/29/24 3:31 PM, Grisha Levit wrote: Avoid leaking ifs_chars on more return paths. Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp

Re: [PATCH] readstr: do not clear undo list

2024-05-30 Thread Chet Ramey
bash-5.3$ ABC AFAICT the rl_maybe_replace_line in _rl_readstr_init is the issue. Thanks for the report. This looks like the right fix, since we're not moving off this history entry. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

Re: Bash has a stack overflow vulnerability

2024-05-30 Thread Chet Ramey
send it to you? If I send it to you, can I still obtain a CVE identifier? Send it to me -- directly if you like -- so we can see if you've got something. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: compute_lcd_of_matches w/ mismatched upper/lowercase byte counts

2024-05-29 Thread Chet Ramey
of different lengths is a tricky problem; you have to choose the shortest. 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/

Re: yet another $(case ... parse bug

2024-05-28 Thread Chet Ramey
as a matter of course. -- ``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: yet another $(case ... parse bug

2024-05-28 Thread Chet Ramey
extract_command_subst() in the right place. 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/

Re: segmentation fault after interrupting function that uses "time"

2024-05-28 Thread Chet Ramey
On 5/23/24 9:09 PM, Grisha Levit wrote: On Thu, May 23, 2024 at 3:55 PM Chet Ramey wrote: On 5/23/24 7:43 AM, Michael Maurer wrote: Bash Version: 5.2 Patch Level: 15 Release Status: release Description: Calling a function that itself uses the keyword "time" to call another

Re: Incorrect string length check

2024-05-25 Thread Chet Ramey
On 5/23/24 9:55 PM, Collin Funk wrote: Hi Chet, In this commit in the devel branch: commit 03c8c43b79177fa678714893e9f05b1c517592c0 Author: Chet Ramey Date: Fri Apr 5 09:03:52 2024 -0400 man page typesetting updates for compatibilityand layout issues I think there was a typo

Re: [PATCH] rl_change_case: skip over invalid mbchars

2024-05-25 Thread Chet Ramey
gle byte. 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: [PATCH] rl_change_case: skip over invalid mbchars

2024-05-23 Thread Chet Ramey
On 5/23/24 3:25 PM, Grisha Levit wrote: On Thu, May 23, 2024 at 10:25 AM Chet Ramey wrote: On 5/21/24 2:42 PM, Grisha Levit wrote: Avoid using (size_t)-1 as an offset. I can't reproduce this on macOS. Where is the code that's using -1 as an offset? The loop in rl_change_case does

Re: segmentation fault after interrupting function that uses "time"

2024-05-23 Thread Chet Ramey
d64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux -- ``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 D

Re: [PATCH] rl_change_case: skip over invalid mbchars

2024-05-23 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: sh vs. bash -xc 'a=b c=$a'

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

Re: sh vs. bash -xc 'a=b c=$a'

2024-05-23 Thread Chet Ramey
ct) or two (incorrect) lines were used. There's nothing incorrect about it. The bash output clearly tells you the order of operations, which is the whole purpose of -x. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, U

Re: [PATCH] spell-correct-word: avoid inf loop with neg arg

2024-05-22 Thread Chet Ramey
On 5/21/24 10:41 PM, Grisha Levit wrote: bash --norc -in <<< $'A \e-\cXs' I think I'd rather make negative counts work in the opposite direction. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ram

Re: [PATCH] dynamic-complete-history: avoid null ptr qsort UB

2024-05-22 Thread Chet Ramey
Sanitizer: undefined-behavior bashline.c:3720:16 Interesting that this has never actually hit since 1991 when dynamic history completion was implemented. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: printf -u "$fd"?

2024-05-22 Thread Chet Ramey
On 5/22/24 12:32 AM, Zachary Santer wrote: On Tue, May 21, 2024 at 3:06 PM Chet Ramey wrote: On 5/21/24 11:14 AM, Zachary Santer wrote: On Tue, May 21, 2024 at 9:01 AM Chet Ramey wrote: On 5/21/24 6:17 AM, Zachary Santer wrote: I was wondering what the relationship between the devel

Re: [PATCH] bashline: small leaks

2024-05-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: [PATCH] execute-named-command: fix small leaks

2024-05-22 Thread Chet Ramey
this slightly differently. -- ``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: printf -u "$fd"?

2024-05-21 Thread Chet Ramey
On 5/21/24 11:14 AM, Zachary Santer wrote: On Tue, May 21, 2024 at 9:01 AM Chet Ramey wrote: On 5/21/24 6:17 AM, Zachary Santer wrote: I was wondering what the relationship between the devel and master branches was. No mystery: the devel branch captures ongoing development, gets

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-21 Thread Chet Ramey
know if that would be good enough for the initial purpose. Apparently not, since there's been an example autoload function in the tree for 30 years. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-21 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/

Re: printf -u "$fd"?

2024-05-21 Thread Chet Ramey
later? Probably, yes. Do you keep a list of TODOs and things under consideration somewhere? I do, it's more of the `folder of ideas' style. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
WD? Should it fall back to $PATH? What do you do with a null value? (Yes, no, same as you do today.) It just avoids introducing a new variable. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc..

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 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: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
e something else. generally only improves the status quo, I don't think everyone agrees with this. Certainly it's disputed even in the discussion here. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UT

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 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: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
ing things? -- ``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 v2 5/8] builtins/source: parse the -i option

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
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: printf -u "$fd"?

2024-05-20 Thread Chet Ramey
some of the work here, and bash has a replacement for systems where it's missing, but that's more than I want to change before bash-5.3 comes out. Maybe after that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
that's user-visible like BASH_SOURCE_PATH, except that it's more obscure and fragile. -- ``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_signa

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
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 v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
On 5/17/24 9:47 PM, Martin D Kealey wrote: On Fri, 17 May 2024 at 04:18, Chet Ramey <mailto:chet.ra...@case.edu>> wrote: On 5/16/24 11:54 AM, G. Branden Robinson wrote: > At 2024-05-16T11:36:50-0400, Chet Ramey wrote: >> On 5/15/24 6:27 PM, Robert Elz wrote

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-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: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
On 5/17/24 11:40 AM, Robert Elz wrote: Date:Fri, 17 May 2024 10:09:06 -0400 From:Chet Ramey Message-ID: | If you don't want `.' to search $PATH, turn off the `sourcepath' shell | option. That part I assumed was already taken care of (that is, would

Re: [PATCH] bracketed paste unterminated buffer

2024-05-20 Thread Chet Ramey
On 5/20/24 10:56 AM, Grisha Levit wrote: On Mon, May 20, 2024, 10:52 Chet Ramey <mailto:chet.ra...@case.edu>> wrote: On 5/20/24 10:42 AM, Grisha Levit wrote: > If bracketed paste input terminates prior to the paste end sequence, How would this happen? The termi

Re: [PATCH] bracketed paste unterminated buffer

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-20 Thread Chet Ramey
reasonable value. Bash would not set this to any value, since it doesn't install anything that would use it. To set it is to apply policy. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: [PATCH] globsort: handle int overflow in cmp functions

2024-05-20 Thread Chet Ramey
ant thing to code , an overall one We're talking about different ways to avoid 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/~c

Re: count in vi mode alters prompt

2024-05-20 Thread Chet Ramey
On 5/20/24 9:34 AM, Mohamed Akram wrote: Is there a way to disable this feature, at least in vi mode? No. -- ``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: [PATCH] globsort: handle int overflow in cmp functions

2024-05-20 Thread Chet Ramey
On 5/17/24 5:56 PM, Grisha Levit wrote: On Fri, May 17, 2024 at 3:06 PM Chet Ramey wrote: On 5/17/24 12:57 PM, Grisha Levit wrote: The current cmp implementation for size and blocks subtracts the two values and returns the difference as an int. This subtraction can overflow, and the returned

Re: count in vi mode alters prompt

2024-05-20 Thread Chet Ramey
. This causes the entire line to shift, which is particularly jarring if a long prompt is used, as is common. This is standard readline behavior in both emacs and vi mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey

Re: [PATCH] globsort: handle int overflow in cmp functions

2024-05-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: [PATCH] fdopen in read -e -u N

2024-05-17 Thread Chet Ramey
r expectations. -- ``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 v2 5/8] builtins/source: parse the -i option

2024-05-17 Thread Chet Ramey
not exporting such a variable to begin with unless you're sure of its effects. -- ``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

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-17 Thread Chet Ramey
th the same number of blocks (and in this case, size, mod time). Because it's a complication that may or may not be worth implementing without some critical mass of people asking for it. Let's see how this goes first. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-17 Thread Chet Ramey
On 5/16/24 11:36 PM, Robert Elz wrote: Date:Thu, 16 May 2024 11:36:50 -0400 From:Chet Ramey Message-ID: <613852f3-c9ef-43d8-821b-37be3d9e9...@case.edu> | You can already do this; there's no reason to add these semantics to a | variable setting

Re: Stray comma in documentation of GLOBSORT

2024-05-17 Thread Chet Ramey
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: build failure without system extension macros

2024-05-16 Thread Chet Ramey
On 5/16/24 3:40 PM, Collin Funk wrote: Hi Chet, On 5/16/24 7:25 AM, Chet Ramey wrote: Yes. This was inspired by https://lists.gnu.org/archive/html/bug-bash/2024-04/msg00158.html I'm not sure if you have dealt with this particular one yet, but I would just get rid of the u_char, u_short

Re: proposed BASH_SOURCE_PATH

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

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-16 Thread Chet Ramey
On 5/16/24 11:54 AM, G. Branden Robinson wrote: At 2024-05-16T11:36:50-0400, Chet Ramey wrote: On 5/15/24 6:27 PM, Robert Elz wrote: and any attempt to use a relative path (and you can exclude ./anything or ../anything from that if you prefer - ie: Those are not relative paths. ! POSIX

Re: proposed BASH_SOURCE_PATH

2024-05-16 Thread Chet Ramey
`invisible' action? You have to actually set the variable to use 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

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-16 Thread Chet Ramey
On 5/15/24 11:25 AM, Koichi Murase wrote: 2024年5月15日(水) 22:13 Chet Ramey : On 5/14/24 4:48 PM, Koichi Murase wrote: However, at the same time, I think the new option could be justified from the viewpoint of language design. If we have a new namespace ``BASH_SOURCE_PATH'' for the scripts

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-16 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: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-16 Thread Chet Ramey
On 5/15/24 11:31 AM, Koichi Murase wrote: 2024年5月15日(水) 22:21 Chet Ramey : On 5/14/24 7:15 PM, Koichi Murase wrote: In case we talk about different designs, I assume the following one: * `source name' searches the files in BASH_SOURCE_PATH, PATH, and the current working directory. No, I'm

Re: [PATCH] builtins build with -std=

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

Re: build failure without system extension macros

2024-05-16 Thread Chet Ramey
ong 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: proposed BASH_SOURCE_PATH

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

Re: proposed BASH_SOURCE_PATH

2024-05-15 Thread Chet Ramey
ting behavior like you propose? -- ``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: proposed BASH_SOURCE_PATH

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

Re: proposed BASH_SOURCE_PATH

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

Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions

2024-05-15 Thread Chet Ramey
refactoring work I've done. It's a placeholder while we talk about behavior and semantics. I appreciate the work you did and your willingness to discuss it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions

2024-05-15 Thread Chet Ramey
choose to do 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/

Re: [PATCH v2 8/8] shell: restrict BASH_SOURCE_PATH when appropriate

2024-05-15 Thread Chet Ramey
it with the "no defaults" idea. That would again require everyone to update whatever restricted shell configuration they have now. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.e

Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode

2024-05-15 Thread Chet Ramey
'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-15 Thread Chet Ramey
-i name', if it would be added, searches the files in BASH_SOURCE_PATH (excluding PATH and the current working directory unless `.' is included in BASH_SOURCE_PATH). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-15 Thread Chet Ramey
On 5/14/24 5:40 PM, Robert Elz wrote: Date:Tue, 14 May 2024 15:51:10 -0400 From:Chet Ramey Message-ID: | What do folks think about forcing an option to enable using | BASH_SOURCE_PATH? Should it be required? Is it necessary? (I personally | think

Re: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-15 Thread Chet Ramey
ft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: bash parallel build: make[1]: warning: -j16 forced in submake: resetting jobserver mode.

2024-05-15 Thread Chet Ramey
On 5/14/24 6:07 PM, Dan Shelton wrote: On Fri, 26 Apr 2024 at 15:10, Chet Ramey wrote: On 4/25/24 9:56 PM, Dan Shelton wrote: Everyone seems to support MAKEFLAGS by now, and it's part of POSIX, so maybe we delete $(MFLAGS) and rely on make to pass MAKEFLAGS to submakes in the environment

Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode

2024-05-14 Thread Chet Ramey
when using PATH) when not in posix mode. -- ``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 v2 1/8] findcmd: parameterize path variable in functions

2024-05-14 Thread Chet Ramey
nga, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions

2024-05-14 Thread Chet Ramey
herwise you just use $PATH as normal. The cases where path_value() returns NULL or an empty string would be anyway handled by find_in_path() path_value() won't return an empty string. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' -

Re: [PATCH v2 6/8] builtins/source: use source path in isolated mode

2024-05-14 Thread Chet Ramey
element anywhere is equivalent to `.'. Does this require a special case? -- ``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 v2 8/8] shell: restrict BASH_SOURCE_PATH when appropriate

2024-05-14 Thread Chet Ramey
in restricted mode. -- ``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 v2 7/8] variables: define default BASH_SOURCE_PATH

2024-05-14 Thread Chet Ramey
doesn't install any `libraries'. Maybe it would be better to let it be something the builder or distro defines. -- ``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: [PATCH v2 5/8] builtins/source: parse the -i option

2024-05-14 Thread Chet Ramey
, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH v2 1/8] findcmd: parameterize path variable in functions

2024-05-14 Thread Chet Ramey
the existence of find_in_path(). -- ``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: bug in bash

2024-05-14 Thread Chet Ramey
On 5/14/24 11:12 AM, Chet Ramey wrote: On 5/14/24 10:20 AM, Andreas Schwab wrote: On Mai 14 2024, Chet Ramey wrote: Setting the process group might solve this particular issue, at the cost of losing keyboard-generated signals. That's not so bad for SIGINT, though people do expect to be able

Re: logic in m4/strtoimax.m4 inverted

2024-05-14 Thread Chet Ramey
On 5/14/24 11:17 AM, Evan Gates wrote: On Mon, Oct 3, 2022 at 12:48 PM Chet Ramey wrote: On 10/1/22 6:38 AM, Emanuel Haupt wrote: Static build of 5.2 fails to build on FreeBSD 13.1-RELEASE (amd64). The logic in m4/strtoimax.m4 is inverted. The following patch replaces strtoimax

Re: bug in bash

2024-05-14 Thread Chet Ramey
On 5/14/24 10:20 AM, Andreas Schwab wrote: On Mai 14 2024, Chet Ramey wrote: Setting the process group might solve this particular issue, at the cost of losing keyboard-generated signals. That's not so bad for SIGINT, though people do expect to be able to kill a procsub when you interrupt

Re: Changed behaviour of ${PARAMETER/#PATTERN/STRING} and ${PARAMETER/%PATTERN/STRING}

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

Re: bug in bash

2024-05-14 Thread Chet Ramey
On 5/13/24 3:37 PM, Oğuz wrote: On Monday, May 13, 2024, Chet Ramey <mailto:chet.ra...@case.edu>> wrote: performs the setpgid in the process forked to run the process substitution). Yes, this sounds like the easy way. I don't know how else to prevent the race in OP. Cl

Re: bug in bash

2024-05-13 Thread Chet Ramey
ame process group as the shell performing the word expansions. This is how ksh93 does it as well (zsh, by contrast, performs the setpgid in the process forked to run the process substitution). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Re: [sr #111058] Problem transmitting script arguments

2024-05-08 Thread Chet Ramey
ing the link will take you to the appropriate savannah issue page, where you can add a comment. savannah is rather self-contained; the notifications are so interested people can go to savannah and contribute. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'

Re: [PATCH 0/4] Add import builtin

2024-05-08 Thread Chet Ramey
'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-08 Thread Chet Ramey
then (1989), `type' was the only builtin that supported any kind of long option; no other builtins ever have. -- ``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 0/4] Add import builtin

2024-05-08 Thread Chet Ramey
that the `source' builtin should also follow POSIX. Because `.' and `source' have always been equivalent, and it will take a better reason than this to change that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

  1   2   3   4   5   6   7   8   9   10   >