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


Groups > gnu.bash.bug > #14349 > unrolled thread

Re: DIRSTACK[0] contains literal "~"

Started byChet Ramey <chet.ramey@case.edu>
First post2018-07-17 10:07 -0400
Last post2018-07-17 10:07 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#14349 — Re: DIRSTACK[0] contains literal "~"

FromChet Ramey <chet.ramey@case.edu>
Date2018-07-17 10:07 -0400
SubjectRe: DIRSTACK[0] contains literal "~"
Message-ID<mailman.3712.1531836455.1292.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web