Re: Logical expressions and job control

2023-02-13 Thread Chet Ramey
On 2/10/23 1:10 PM, Godmar Back wrote: Hi, the students in my Systems course are currently working on their shell assignment and of course are giving bash a spin to compare features. One student pointed out that logical expressions such as `a` && `b` in bash don't seem to work when `a` is stoppe

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

2023-02-13 Thread Oğuz
13 Şubat 2023 Pazartesi tarihinde Koichi Murase yazdı: > One of the > cases that the fork cost of $() becomes a problem and that other > languages cannot be really used is the prompt setting `PS1' containing > command substitutions. Bash has many escape sequences to enrich your prompt strings.

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

2023-02-13 Thread Koichi Murase
2023年2月14日(火) 2:16 Oğuz : > 13 Şubat 2023 Pazartesi tarihinde Koichi Murase > yazdı: >> Nevertheless, even if we forget about trap, jobs, etc., ${ list; } >> alone is very useful as it's free from the fork cost > > Shells fork all the time. If your application can't afford the overhead, > you've

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

2023-02-13 Thread Oğuz
13 Şubat 2023 Pazartesi tarihinde Koichi Murase yazdı: > > Nevertheless, even if we forget about trap, jobs, etc., ${ list; } > alone is very useful as it's free from the fork cost Shells fork all the time. If your application can't afford the overhead, you've chosen the wrong language to write

Re: Defining variable as local -r defines variable outside the function in some cases

2023-02-13 Thread Koichi Murase
2023年2月14日(火) 0:39 Voldemar Lazarev via Bug reports for the GNU Bourne Again SHell : > Description: > When a function has a variable (e.g. "X") defined as local and read-only > ("local -r") and the function is called with variable of same name ("X") > specified before function name (see the "

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

2023-02-13 Thread Koichi Murase
2023年2月13日(月) 22:00 Oğuz İsmail Uysal : > On 2/13/23 2:43 PM, Koichi Murase wrote: > > I guess just the support for ksh's ${ list; } [1] would make > > everything simple and clear. One can simply call ${ jobs; }, ${ trap > > -p; }, etc. without thinking about subshells. > I don't see what differenc

Defining variable as local -r defines variable outside the function in some cases

2023-02-13 Thread Voldemar Lazarev via Bug reports for the GNU Bourne Again SHell
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: darwin22.1.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC uname output: Darwin hostname_is_not_disclosed.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/

Re: Regression in pattern substitution with compat42

2023-02-13 Thread Chet Ramey
On 2/9/23 5:32 PM, Martin D Kealey wrote: On 8 Feb 2023 at 18:50Z Tom Briden wrote: Bash Version: 5.2 Patch Level: 15 Release Status: release As of version 5.2-beta, replacing a single backslash with a double backslash is no longer possible when using BASH_COMPAT=4.2. On 9 Feb 2023 at 15:57Z

Re: number of bugs

2023-02-13 Thread alex xmb ratchev
On Mon, Feb 13, 2023, 2:55 PM Soukaina Ramdani wrote: > Hello, > is there any chance to have the number of bugs. > Thank you. > i'd be all for persistant statistics two bugs lists , one [fixed] one [notfixed] >

number of bugs

2023-02-13 Thread Soukaina Ramdani
Hello, is there any chance to have the number of bugs. Thank you.

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

2023-02-13 Thread Oğuz İsmail Uysal
On 2/13/23 2:43 PM, Koichi Murase wrote: I guess just the support for ksh's ${ list; } [1] would make everything simple and clear. One can simply call ${ jobs; }, ${ trap -p; }, etc. without thinking about subshells. I don't see what difference that'd make. A subshell inherits its parent's job

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

2023-02-13 Thread Koichi Murase
2023年2月13日(月) 13:29 Martin D Kealey : > The contorted rules for reporting the state of the parent shell suggest > that maybe the entire approach needs re-thinking. Yeah, maybe we can rethink the approach and find an ideal shell design. But even when we found it, we would need to continue to mainta