Re: "return" should not continue script execution, even if used inappropriately

2019-01-08 Thread don fong
> > df...@dfong.com said: > | there's a good reason for the "craziness": it enables individual > testing of > | the script's functions. > > For that kind of use there's a trivial solution (as there often > is for cases when people are sure that the current definition > is inadequate). > to be

Re: weird insert of backslashes in strings

2019-01-08 Thread Dennis Williamson
On Tue, Jan 8, 2019, 3:10 PM Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -fstack-protector -Wno-parentheses -Wno-format-security > uname output: Linux bongo 2.6.32-042stab134.8 #1 SMP Fri Dec 7 17:16:09 >

Re: segfaults with function attribute manipulations

2019-01-08 Thread Chet Ramey
On 1/8/19 4:36 AM, Grisha Levit wrote: > A couple silly function attribute manipulations lead to situations that > result in segfaults: Thanks for the report. > > $ f() { :; }; declare -Af f; declare -pf f > [ segfault ] > > diff --git a/builtins/setattr.def b/builtins/setattr.def > index 251bc

weird insert of backslashes in strings

2019-01-08 Thread axel
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -fstack-protector -Wno-parentheses -Wno-format-security uname output: Linux bongo 2.6.32-042stab134.8 #1 SMP Fri Dec 7 17:16:09 MSK 2018 i686 i686 i386 GNU/Linux Machin

Re: A small documentation suggestion

2019-01-08 Thread Keith Thompson
Yes, you can do that, and it would be a good workaround *if* $EPOCHREALTIME didn't already have 6 digits after the decimal point, including any trailing zeros. The point is that you don't have to, and I'm suggesting that the documentation should make that clear so users can rely on it. ${EPOCHREA

Re: Fwd: BASH_ARGV0 do not inherit from environment variables

2019-01-08 Thread Chet Ramey
On 1/8/19 1:47 AM, Cuong Manh Le wrote: > Hi, > > I'm not sure this a feature or bug, but: > > $ BASH_ARGV0=foo /usr/local/stow/bash/bin/bash -c 'echo "$0"' > /usr/local/stow/bash/bin/bash > > I expect $0 set to foo instead. Thanks for the suggestion. BASH_ARGV0 comes in as a feature s

Re: Regexp string in := parameter expansion triggers failglob

2019-01-08 Thread Andreas Schwab
On Jan 08 2019, polynomia...@gentoo.org wrote: > Description: > When sourcing a script that contains a variable which performs > a := parameter expansion with a regular expression while failglob At this point it is just a random string, not a regular expression, and the fact that := i

Re: Regexp string in := parameter expansion triggers failglob

2019-01-08 Thread Chet Ramey
On 1/8/19 8:35 AM, polynomia...@gentoo.org wrote: > Bash Version: 5.0 > Patch Level: 0 > Release Status: release > > Description: > When sourcing a script that contains a variable which performs > a := parameter expansion with a regular expression while failglob > shell option i

Re: declaration of dollar_dollar_pid

2019-01-08 Thread Chet Ramey
On 1/7/19 11:21 PM, Kiyoshi KANAZAWA wrote: > Hello, > Trying to install bash-5.0 and have error in 'make install' phase. The loadables get installed into a local directory if you want to use them, but they're not essential to building bash or testing it, so they only get built on `make install'.

Regexp string in := parameter expansion triggers failglob

2019-01-08 Thread polynomial-c
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -march=native -mtune=native -O2 -pipe -Wno-parentheses -Wno-format-security uname output: Linux abudhabi 4.19.13 #1 SMP PREEMPT Sat Dec 29 15:21:4

Re: [DOC] Incomplete explanation about the regex =~ operator

2019-01-08 Thread Greg Wooledge
On Tue, Jan 08, 2019 at 10:47:21AM +, gilaro wrote: > See also: Does bash support word boundary regular expressions? Short answer: No. Long answer: Bash's =~ operator uses Extended Regular Expressions (ERE), as implemented by your system's C library's regular expression engine. Your system m

declaration of dollar_dollar_pid

2019-01-08 Thread Kiyoshi KANAZAWA
Hello, Trying to install bash-5.0 and have error in 'make install' phase. $ uname -a SunOS hidden 5.11 11.3 i86pc i386 i86pc $ gcc --version gcc (GCC) 7.4.0 $ ./configure --prefix=/tmp/local CC=gcc CXX=g++ $ make $ make check $ make install     : gcc -shared -Wl,-i -Wl,-h,sync   -o sync sync.o

Re: A small documentation suggestion

2019-01-08 Thread Andreas Schwab
On Jan 07 2019, Keith Thompson wrote: > I suggest documenting this behavior. It would be nice to be able to > depend on the exact format, for example that ${EPOCHREALTIME/*./} > is always exactly 6 digits long. ms=${EPOCHREALTIME/*./}00 ms=${ms:0:6} Andreas. -- Andreas Schwab, SUSE Labs,

segfaults with function attribute manipulations

2019-01-08 Thread Grisha Levit
A couple silly function attribute manipulations lead to situations that result in segfaults: $ f() { :; }; declare -Af f; declare -pf f [ segfault ] diff --git a/builtins/setattr.def b/builtins/setattr.def index 251bcacb..1a828291 100644 --- a/builtins/setattr.def +++ b/builtins/setattr.def @@ -4