On 10/29/17 8:05 PM, Steve Jones wrote:
> While writing a function to save the directory stack as a script, I
> noticed that ${DIRSTACK[0]}, the current directory always has the tilde
> unexpanded.
> 
> This is the same with bash-4.4.12 and bash-4.3.11.
> 
> I was wondering if this is an oversight since DIRSTACK[0] is the same as
> PWD, or intentional.

It's an oversight. It should be expanded, because otherwise the tilde
won't be expanded in something like `cd ${DIRSTACK[0]}', causing it to
fail. I'll fix it. Thanks for pointing this out.

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

Reply via email to