mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
IKEGAMI Tsutomu: sf bug 722366: metafy pwd when read from $PWD
This commit is contained in:
parent
29a3496ebb
commit
5b5c0175d5
2 changed files with 7 additions and 1 deletions
|
|
@ -780,7 +780,8 @@ setupvals(void)
|
|||
* initialize `PWD' from `HOME' */
|
||||
if (ispwd(home))
|
||||
pwd = ztrdup(home);
|
||||
else if ((ptr = zgetenv("PWD")) && ispwd(ptr))
|
||||
else if ((ptr = zgetenv("PWD")) && (strlen(ptr) < PATH_MAX) &&
|
||||
(ptr = metafy(ptr, -1, META_STATIC), ispwd(ptr)))
|
||||
pwd = ztrdup(ptr);
|
||||
else
|
||||
pwd = metafy(zgetcwd(), -1, META_DUP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue