[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unexpanded tilde in DIRSTACK[0]
From: |
Steve Jones |
Subject: |
Unexpanded tilde in DIRSTACK[0] |
Date: |
Sun, 29 Oct 2017 19:05:04 -0500 |
User-agent: |
Mutt/1.8.2 (2017-04-18) |
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.
Having the tilde expanded for DIRSTACK[ n >= 1 ] but not 0 is an
inconsistency when the rest of the array is even $'...' quoted when
necessary.
--
Steve Jones
sjml@slohj.org
- Unexpanded tilde in DIRSTACK[0],
Steve Jones <=