Re: Bash 5.1: Make shell_script_filename available to startup files

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

Say to use test -e in preference to test -a

2021-02-08 Thread 積丹尼 Dan Jacobson
$ man bash #and $ help test #say -a FILETrue if file exists. -e FILETrue if file exists. OK, but add a note that it would be better to use -e, as it is more portable. Compare $ test -a . $ /usr/bin/test -a .

[PATCH] Fix blocking read timeouts at a small probability

2021-02-08 Thread Koichi Murase
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Linux chatoyancy 5.6.13-100.fc30.x86_64 #1 SMP Fri May 15 00:36:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux M

Re: Bash 5.1: Make shell_script_filename available to startup files

2021-02-08 Thread Chet Ramey
On 2/8/21 10:04 AM, Marc Aurèle La France wrote: Yes, I could have all such scripts source a file when they start.  But isn't that just another startup file?  And duplication.  Or pass something through $1;  again duplication.  BASH_SCRIPT is a more elegant solution and doesn't require any int

Re: feature request: ${ regex s expander, and multiple expandrs inside one

2021-02-08 Thread felix
On Fri, Feb 05, 2021 at 09:29:49PM +0100, Alex fxmbsw7 Ratchev wrote: > .. > > var=mynewfoo > printf ${var~~n[^f]+} > -> > myfoo > > and also multiple expanders inside one statement would greatly speed up > processment and also fulfill old greatly coding wanting possibilities This could be

export loses error

2021-02-08 Thread gregrwm
$ export vim=$HOME/.GVim-v8.2.2451.glibc2.15-x86_64.AppImage $ $ vimV=$($vim --version)||echo handle error here #without export, error is captured fuse: failed to exec fusermount: No such file or directory open dir error: No such file or directory handle error here $ $ export

Re: export loses error

2021-02-08 Thread Lawrence Velázquez
> On Feb 8, 2021, at 5:29 PM, gregrwm wrote: > > $ export vim=$HOME/.GVim-v8.2.2451.glibc2.15-x86_64.AppImage > $ > $ vimV=$($vim --version)||echo handle error here #without > export, error is captured > fuse: failed to exec fusermount: No such file or directory > open dir error:

Re: export loses error

2021-02-08 Thread Léa Gris
Le 09/02/2021 à 01:05, Lawrence Velázquez écrivait : On Feb 8, 2021, at 5:29 PM, gregrwm wrote: $ export vim=$HOME/.GVim-v8.2.2451.glibc2.15-x86_64.AppImage $ $ vimV=$($vim --version)||echo handle error here #without export, error is captured fuse: failed to exec fusermount:

extdebug now implies errtrace which implies `trap ... ERR` execution w/out `set -e`

2021-02-08 Thread Mike Frysinger
this set of changes between bash-4.3 & bash-4.4: https://git.savannah.gnu.org/cgit/bash.git/commit/?h=814e1ff513ceca5d535b92f6c8dd9af7554fe83e has this buried nugget: + - shopt_set_debug_mode: make sure error_trace_mode reflects the setting + of extdebug. This one is tentative. Fix

Re: extdebug now implies errtrace which implies `trap ... ERR` execution w/out `set -e`

2021-02-08 Thread Oğuz
9 Şubat 2021 Salı tarihinde Mike Frysinger yazdı: > $ cat test.sh > #!/bin/bash > foo() { > false > return 0 > } > shopt -s extdebug > trap 'echo invalid trap; exit 1' ERR > foo > echo "pass" > $ bash-4.3 ./test.sh > pass > $ bash-4.4 ./test.sh > invalid trap > The manual says that when extd