Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14349

Re: DIRSTACK[0] contains literal "~"

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: DIRSTACK[0] contains literal "~"
Date 2018-07-17 10:07 -0400
Message-ID <mailman.3712.1531836455.1292.bug-bash@gnu.org> (permalink)
References <20180712233853.8C4AA652D1CC@Cyborg.localdomain>

Show all headers | View raw


On 7/12/18 7:38 PM, jeremy.richards@ngc.com wrote:

> Bash Version: 4.2
> Patch Level: 46
> Release Status: release
> 
> Description:
>     I noticed some strange behavior in the DIRSTACK variable (used in pushd/popd). 
>     `declare -p DIRSTACK`
>     shows the list of current directories on the stack, as expected. ${DIRSTACK[@]:1} show correctly expanded paths, i.e., “pushd ~/Jenkins” will correctly store "/home/jeremy/jenkins"
>     However, ${DIRSTACK[0]} does NOT have this behavior, and will encode a literal tilde, e.g., "~/jenkins"

Thanks for the report. This was fixed last October as the result of

http://lists.gnu.org/archive/html/bug-bash/2017-10/msg00110.html

and the fix is in bash-5.0-alpha.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: DIRSTACK[0] contains literal "~" Chet Ramey <chet.ramey@case.edu> - 2018-07-17 10:07 -0400

csiph-web