[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DIRSTACK[0] contains literal "~"
From: |
Chet Ramey |
Subject: |
Re: DIRSTACK[0] contains literal "~" |
Date: |
Tue, 17 Jul 2018 10:07:14 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
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/