Re: bash-5.2.9 lib/readline/input.c fix for Tru64

2022-11-16 Thread Chet Ramey
On 11/15/22 7:25 PM, Koichi Murase wrote: 2022年11月16日(水) 0:11 Chet Ramey : It should be possible to simulate a machine like this by manually editing config.h after running configure. You are right. There are three more places to fix in addition to the two in the previous reply (see the

Re: local/typeset/declare -p - outputs invalid declare -- -

2022-11-16 Thread Chet Ramey
l -' is the only way to save and restore the options; `declare -p -' and `typeset -p -' should have no special meaning. -- ``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: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-11-16 Thread Chet Ramey
It's well worth reading.) I attached the patch I applied. I didn't include your fix to issue 1 above. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-11-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/

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-11-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/ *** ../bash-5.2-patched/lib/glob/sm_loop.c 2021-08-03 10:24:49.0

Re: "cannot execute binary file" error with Bash 5.2

2022-11-18 Thread Chet Ramey
od idea; I should add it to the manual. -- ``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] glob: add shopt globmtimesort to sort globs by mtime

2022-11-18 Thread Chet Ramey
On 11/16/22 12:35 PM, Evan Gates wrote: On Mon Nov 14, 2022 at 1:00 PM MST, Chet Ramey wrote: On 10/3/22 2:56 PM, Evan Gates wrote: --- There is currently no good way to sort files by mtime in the shell. It's possible to do so with an ls that supports -t, but parsing ls is proble

Re: bash 5.2 regression in optimize_connection_fork

2022-11-19 Thread Chet Ramey
ommands so we can at least see what the commands are, and maybe synthesize a reproducer from 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: bash 5.2 regression in optimize_connection_fork

2022-11-21 Thread Chet Ramey
ave somthing from a slightly different angle that I think will work as well. -- ``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: bash memory leak when querying associative array for nonexisting element

2022-11-21 Thread Chet Ramey
I did not find a fix. Thanks for the report. Koichi's fix is a good one. 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: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-11-22 Thread Chet Ramey
le Character" supersedes it. I attached the latest patch against bash-5.2.9. 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/~

Re: [EXT] Re: manual page missing ${parameter-replacement}

2022-11-22 Thread Chet Ramey
with boldface. This is correct. The operator is in boldface, as is the corresponding short name for or description of the operator. -- ``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: `time ( someCmd )` Doesn't Print Time Under 5.2

2022-11-22 Thread Chet Ramey
e did. Thanks for the report. It's an easy fix; bash was optimizing away the fork and therefore not printing the timing information. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: `time ( someCmd )` Doesn't Print Time Under 5.2

2022-11-22 Thread Chet Ramey
/lists.gnu.org/archive/html/bug-bash/2021-09/msg00047.html No, all that stuff is a red herring. -- ``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: `time ( someCmd )` Doesn't Print Time Under 5.2

2022-11-22 Thread Chet Ramey
On 11/22/22 5:04 PM, Dabrien 'Dabe' Murphy wrote: On 11/22/22 5:01 PM, Chet Ramey wrote: Thanks for the report. It's an easy fix; bash was optimizing away the fork and therefore not printing the timing information. Awesome!     Hitting it with a hammer: $10      Knowing

Re: read builtin: timeout setting valid is next read

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

Re: If Conditional Logic Error in Bash

2022-11-23 Thread Chet Ramey
e -eq 1 ] Since the `-eq' operator requires integer operands, you get this error: line 135: [: false: integer expression expected. -- ``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: bash 5.2 regression in optimize_connection_fork

2022-11-25 Thread Chet Ramey
edit where credit is due. -- ``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/

Bash-5.2 official patch 11

2022-11-25 Thread Chet Ramey
o find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 11 #endif /* _PATCHLEVEL_H_ */ -- ``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/

Bash-5.2 official patch 10

2022-11-25 Thread Chet Ramey
ne PATCHLEVEL 9 #endif /* _PATCHLEVEL_H_ */ --- 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 10 #endif /* _PATCHLEVEL_H_ */ -- ``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/

Bash-5.2 official patch 12

2022-11-25 Thread Chet Ramey
020-10-01 11:01:28.0 -0400 *** *** 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 11 #endif /* _PATCHLEVEL_H_ */ --- 26,30 looks for to find the patch level (for the sccs version string). */

Re: [bash 4] 'test -v 1' is never true

2022-11-26 Thread Chet Ramey
l/bug-bash/2018-12/msg00104.html https://lists.gnu.org/archive/html/bug-bash/2020-01/msg00027.html I added support for testing positional parameters in bash-5.1. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrate

Re: Bad leaks file fd to child processes

2022-11-26 Thread Chet Ramey
.html Can you supply a reproducer that demonstrates this is a problem with bash? -- ``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: degraded error message in case of hash-bang interpreter error

2022-11-28 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/

Re: Localised variables become exposed to environment when FUNCNEST reached

2022-11-28 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/

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-12-01 Thread Chet Ramey
On 11/28/22 5:51 AM, Koichi Murase wrote: 2022年11月23日(水) 5:24 Chet Ramey : I attached the latest patch against bash-5.2.9. commit 3c9dd4565792bc53de3a94ec38a65a1989f3fe2f (upstream/devel) associative array elements; last set of changes to globbing bracket expressions; fix for

Re: bash "extglob" needs to upgrade at least like zsh "kshglob"

2022-12-01 Thread Chet Ramey
On 11/28/22 5:51 AM, Koichi Murase wrote: 2022年11月23日(水) 5:24 Chet Ramey : I attached the latest patch against bash-5.2.9. commit 3c9dd4565792bc53de3a94ec38a65a1989f3fe2f (upstream/devel) associative array elements; last set of changes to globbing bracket expressions; fix for

Re: declare XXX=$(false);echo $?

2022-12-02 Thread Chet Ramey
uld? `declare' has a well-defined return status. -- ``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: declare XXX=$(false);echo $?

2022-12-05 Thread Chet Ramey
nteractive shells, but interactive shells continue. -- ``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: `declare -f' does not output the "function" keyword when required

2022-12-05 Thread Chet Ramey
ition with the "function" keyword, generating invalid code: 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://tiswww.cwru.edu/~chet/

Re: `declare -f "a="' fails unnecessarily

2022-12-05 Thread Chet Ramey
On 12/3/22 6:18 AM, Emanuele Torre wrote: `declare -f "something="' fails with the following error: Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, U

Re: Handling files with CRLF line ending

2022-12-05 Thread Chet Ramey
s longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Pending signal in EXIT trap causes pattern matching to fail

2022-12-08 Thread Chet Ramey
On 12/7/22 11:24 AM, Andreas Schwab wrote: On Okt 12 2022, Chet Ramey wrote: But that's not really the issue right here. The question is whether the shell should process additional terminating signals while it's running the exit trap from the terminating signal handler. The probl

Re: loadables/finfo: fix time_t printing

2022-12-09 Thread Chet Ramey
report. I chose the second option. -- ``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: Fix module loading for OpenBSD

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

Re: curiosity: 'typeset -xr' vs. 'export -r'

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

Bash-5.2 patch 13

2022-12-14 Thread Chet Ramey
VEL_H_ */ --- 26,30 looks for to find the patch level (for the sccs version string). */ ! #define PATCHLEVEL 13 #endif /* _PATCHLEVEL_H_ */ -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Rame

Bash-5.2 patch 14

2022-12-14 Thread Chet Ramey
ng). */ ! #define PATCHLEVEL 14 #endif /* _PATCHLEVEL_H_ */ -- ``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: Nested expansion in heredoc fails

2022-12-14 Thread Chet Ramey
mmand substitution within parameter expansion in a here-document line. Here's a patch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.c

Bash-5.2 patch 15

2022-12-14 Thread Chet Ramey
ed. */ ! if (user_subshell && command->type == cm_subshell && ! (command->flags & (CMD_TIME_PIPELINE|CMD_INVERT_RETURN)) == 0) optimize_subshell_command (command->value.Subshell->command); *** ../bash-5.2/patchlevel.h2020-06-22 14:51:03.00000 -0

Re: bash crashes if TERM is unset and the Delete key is pressed twice

2022-12-14 Thread Chet Ramey
thing before the two Delete key presses). I can't reproduce this on macOS, RHEL 7, Fedora 35, or Fedora 37, all using xterm. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: bash crashes if TERM is unset and the Delete key is pressed twice

2022-12-14 Thread Chet Ramey
On 12/14/22 2:01 PM, Emanuele Torre wrote: On Wed, Dec 14, 2022 at 12:31:39PM -0500, Chet Ramey wrote: On 12/13/22 9:00 AM, Emanuele Torre wrote: This happens since 88d69b4fa224d93ef1d26b80229668397bb6496b . If bash is started with the TERM variable unset or empty, it will segfault and crash

Re: compgen stops processing backslashes after any call to bind

2022-12-16 Thread Chet Ramey
pens. -- ``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] loadables/sync: allow fsync of individual files like GNU coreutils

2022-12-19 Thread Chet Ramey
ync(2). Thanks for the patch. 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: Segfault with set -o emacs in -c

2022-12-19 Thread Chet Ramey
I suppose that says something about how many people try this. -- ``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: for loop goes to stopped job when Ctrl+C is pressed

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

Re: documentation for ${@: -1} is unclear

2022-12-21 Thread Chet Ramey
On 12/20/22 3:40 PM, Emanuele Torre wrote: The bash manual says: 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://tiswww.cwru.edu/~chet/

Re: Bug: Subshell won't continue after .-sourcing a file

2022-12-22 Thread Chet Ramey
never be printed. Or $ bash -c '(. <(echo ": && uname"); echo x)' Linux $ x is never printed. Looks like another bug caused by aggressive subshell optimizations Thanks for the reports, both of you. I've attached a patch. Chet -- ``The lyf so

Re: Bug: Subshell won't continue after .-sourcing a file

2022-12-22 Thread Chet Ramey
ript I have. It already has few external dependencies and cleans up before exiting. (Your script, for example, leaves three temp files in the file system.) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Re: printf %n is not documented

2022-12-23 Thread Chet Ramey
). It's a standard part of printf(3), and is standardized by POSIX. Bash doesn't document the standard conversion specifiers. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech,

Re: printf %n is not documented

2022-12-27 Thread Chet Ramey
tandard printf(3) set. -- ``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: Read Prompt Width Miscalculation (Non-Printing Characters)

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

Re: Read Prompt Width Miscalculation (Non-Printing Characters)

2022-12-29 Thread Chet Ramey
meter transformations are already documented. -- ``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: Arithmetic expression: evaluation order bug

2023-01-04 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: Arithmetic expression: evaluation order bug

2023-01-04 Thread Chet Ramey
On 12/30/22 3:44 PM, Steffen Nurpmeso wrote: Digital, logical, liberal, yuck :) We channeling Supertramp here? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc

Re: Arithmetic expression: evaluation order bug

2023-01-04 Thread Chet Ramey
onga, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Errors are ignored with local variable assignment

2023-01-04 Thread Chet Ramey
://lists.gnu.org/archive/html/bug-bash/2022-12/msg3.html -- ``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: Arithmetic expression: evaluation order bug

2023-01-04 Thread Chet Ramey
On 1/4/23 10:36 AM, G. Branden Robinson wrote: ..and some spend their years watching the moon bear wank himself off. Or, if you were in Yorkshire last week, a walrus. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

Re: Arithmetic expression: evaluation order bug

2023-01-04 Thread Chet Ramey
On 1/4/23 12:21 PM, Steffen Nurpmeso wrote: Chet Ramey wrote in <8a61e01d-65c0-6c91-3575-399022fcb...@case.edu>: |On 12/30/22 3:44 PM, Steffen Nurpmeso wrote: | |> Digital, logical, liberal, yuck :) | |We channeling Supertramp here? For a nice Breakfast in America, yes. (N

Re: UBSAN error in lib/sh/random.c:79

2023-01-10 Thread Chet Ramey
ge the line in question to l = ret % 127773; That is equivalent mathemetically and won't overflow (the overflow isn't actually damaging, though). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates C

Re: UBSAN error in lib/sh/random.c:79

2023-01-10 Thread Chet Ramey
harm - or maybe even is intended... Positive-to-negative overflow doesn't hurt the algorithm, but since overflow is undefined behavior, anything can happen. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hipp

Re: UBSAN error in lib/sh/random.c:79

2023-01-10 Thread Chet Ramey
is greater? Here's a version that does just that: Thanks, I pushed what I think is a simpler fix that should work fine. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: errexit is not suspended in a pipeline

2023-01-11 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/

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Chet Ramey
On 1/11/23 4:04 PM, Quinn Grier wrote: On 2023-01-11 06:44, Chet Ramey wrote: On 1/10/23 9:36 PM, Quinn Grier wrote: In the documentation for set -e, the Bash manual says that errexit is suspended in all but the last command of a pipeline:     The shell does not exit if the command that

Re: errexit is not suspended in a pipeline

2023-01-12 Thread Chet Ramey
exit. -- ``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: Next word of alias to alias that end with is not checked for alias

2023-01-12 Thread Chet Ramey
nsion like this, and no one has missed 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/

Re: SIGINT handling during async functions

2023-01-16 Thread Chet Ramey
d of. Reinitializing the signals reveals the real handler, and `trap -p' just displays it. It's setting SIGINT to be `hard ignored' that is the problem here. -- ``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: Possible bug in bash

2023-01-16 Thread Chet Ramey
of a simple command," the "next command word" is presumably the word following that one. The same is true for case alias al=' ' alias foo=bar al case foo in foo) echo foo;; bar) echo bar;; esac Everybody prints `foo'. -- ``The lyf so short, the craft so long to ler

Re: BASH_XTRACEFD=1 read variable stdout flushing?

2023-01-16 Thread Chet Ramey
g to write the trace output into the pipe, where `read' will see 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/

Re: 回复: Possible bug in bash

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

Re: Question about monitor mode / ignoreeof / EOF read

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

Re: [Suggestion] Flush command history to a "backup" file periodically

2023-01-20 Thread Chet Ramey
to run `history -a' (or `history -w' if you're paranoid) with whatever granularity you choose. -- ``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 in bash --posix

2023-01-20 Thread Chet Ramey
the FUNCNEST variable. -- ``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: SIGINT handling during async functions

2023-01-23 Thread Chet Ramey
On 1/21/23 7:55 AM, Tycho Kirchner wrote: Am 16.01.23 um 18:26 schrieb Chet Ramey: The fix is to add enough state machinery to detect this situation and behave in a way that can satisfy both the standard and the later interpretation, while being careful not to undo this work later. This is

Re: SIGINT handling during async functions

2023-02-02 Thread Chet Ramey
respond to tcsetpgrp. Try running something in a Docker container; that doesn't guarantee a controlling terminal. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
tion names like this in real life. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
array variable a. In this theoretical exercise, trying to remove an unset subscript and actually removing a shell function would be worse. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CW

Re: unset does not remove functions like a[b] unless -f is specified

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

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
ign, unquoted, all digits, etc.). It was when I added posix mode changes between bash-1.13 and bash-1.14 that the restrictions on names came in. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
bash doesn't import function names containing slashes from the environment. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
were almost ten years in with posix mode! 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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
has allowed slashes in function names since the beginning: 1988. I can see a case for posix mode disallowing execution of functions whose names contain a slash, but default mode has always allowed it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars long

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
g to your previous message. It's time for them to catch up. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-03 Thread Chet Ramey
On 2/3/23 7:01 PM, Robert Elz wrote: Date:Fri, 3 Feb 2023 11:22:23 -0500 From:Chet Ramey Message-ID: | > Hmm, I wonder whether <(:) could be a valid function name, | > if it expands to something like /dev/fd/63? | | Bash doesn't

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-04 Thread Chet Ramey
On 2/3/23 11:50 PM, Koichi Murase wrote: 2023年2月4日(土) 11:12 Chet Ramey : But a posix conforming shell will still never execute a function that has a '/' in its name, even if it has extended the character set for function names, and allows '/' in that set. Yep. I'll

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-04 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/

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-04 Thread Chet Ramey
much doubt this would happen, but anything's possible. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-04 Thread Chet Ramey
to execute the file in question. -- ``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: unset does not remove functions like a[b] unless -f is specified

2023-02-06 Thread Chet Ramey
r that in early November, after I released bash-5.2, and revised it in mid-December. If you ask for an interpretation, instead of a discussion, the group will eventually have to respond. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis&#

Re: Tilde expansion bug in associative array assignments?

2023-02-06 Thread Chet Ramey
rt, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Having an alias and a function with the same name leads to some sort of recursion

2023-02-07 Thread Chet Ramey
ition. -- ``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: Word-skipping with alias-expand-line

2023-02-08 Thread Chet Ramey
e expanded, or whether the expanded line differs from the original one. -- ``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] local_builtin: do not overwrite previously saved options with local -

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

Re: Regression in pattern substitution with compat42

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

Re: [PATCH] use bind_lastarg to restore $_ when executing variable

2023-02-10 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/

Re: SIGINT handling during async functions

2023-02-10 Thread Chet Ramey
thing like daemon(1), but if someone wants to take a shot -- using a new name, obviously -- let's talk about it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case

Re: Regression in pattern substitution with compat42

2023-02-13 Thread Chet Ramey
:57Z Chet Ramey wrote: shopt -u patsub_replacement Surely that should be automatic with compat51 and earlier, since it's a breaking change to previous behaviour? That's not what the compat mode is for. It's intended as a temporary stopgap for things that change between releases

Re: Logical expressions and job control

2023-02-13 Thread Chet Ramey
onale for bash's behavior in this case and is this something that should be changed? The cause and rationale should be clear from the explanation above. Pretty much every shell but ksh behaves like bash, so this is probably going to stay as-is. Chet -- ``The lyf so short, the craft so long to

Re: "builtin jobs" does not output to stdout.

2023-02-14 Thread Chet Ramey
ash-1.05 (March 1990) and bash-1.08 (May 1991). I never extended this special case to `builtin' or `command'. -- ``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: "builtin jobs" does not output to stdout.

2023-02-14 Thread Chet Ramey
1b]. Whether or not `builtin' is specified by POSIX isn't really relevant. That list just means that some shells have implemented `builtin' as a builtin command, so portable applications should take care with 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/

<    3   4   5   6   7   8   9   10   11   12   >