Re: return bultin ignores explicit exit value when used in DEBUG trap

2015-11-26 Thread Chet Ramey
On 11/19/15 2:06 AM, Grisha Levit wrote: > Not sure if this is a documentation bug or a functional one, but the man page > does not seem to agree with the observed behavior for return when invoked in > DEBUG traps. Thanks for the report. The internal trap handler used for DEBUG and other signal

Re: OLDPWD unset when bash starts

2015-11-26 Thread John Wiersba
Thanks, Chet! From: Chet Ramey To: John Wiersba ; "bug-bash@gnu.org" Cc: chet.ra...@case.edu Sent: Thursday, November 26, 2015 12:41 PM Subject: Re: OLDPWD unset when bash starts On 11/18/15 2:44 PM, John Wiersba wrote: > Why does bash clear OLDPWD when a child script is starte

Re: \177 at the end of a variable

2015-11-26 Thread Chet Ramey
On 11/23/15 5:29 AM, isabella parakiss wrote: > $ str=abcd; [[ $'a\177' = a"${str:4:1}" ]]; echo $? > 0 > > > This happens in every version since 3.1, including the devel branch. This was fixed in early November as a result of http://lists.gnu.org/archive/html/bug-bash/2015-11/msg8.html --

Re: Lower case construction does not working properly

2015-11-26 Thread Chet Ramey
On 11/24/15 9:23 AM, Pierre Gaston wrote: > As an aside shopt -s nocasematch and shopt -s nocaseglob don't seem to > apply, with both on: > > $ VAR=COLORADO; echo ${VAR,[c]} > COLORADO It doesn't seem to make sense to disregard case in a word expansion that directly tests and manipulates charact

Re: OLDPWD unset when bash starts

2015-11-26 Thread Chet Ramey
On 11/18/15 2:44 PM, John Wiersba wrote: > Why does bash clear OLDPWD when a child script is started? Because a new shell does not have a `previous working directory'. It's supposed to be set by cd, and if you haven't executed cd, you don't have one. It seems reasonable to inherit OLDPWD if it n

Re: bash 4.3.42 does not link on Solaris 2.4

2015-11-26 Thread Chet Ramey
On 11/13/15 2:45 PM, Klaus Ziegler - owner of sunfreeware.de wrote: > Configuration Information [Automatically generated, do not change]: > Machine: sparc > OS: solaris2.4 > Compiler: cc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' > -DCONF_OSTYPE='solaris2.4' -DCONF_MACHTYPE='sp

Re: prompt with \w incl. long UTF string messes up command line

2015-11-26 Thread Linda Walsh
Your prompt might be too long. Your 'dir' string is awfully long... echo "$dir"|wc -c 270 --- I tried a shorter version on linux: sdir='△_ >' pre='Ishtar:/tmp/' ## prefix of my dir Ishtar:/tmp/△> 012345678901234567890123456 -bash: 012345678901234567890123456: command no