1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 05:21:00 +01:00

IKEGAMI Tsutomu: sf bug 722366: metafy pwd when read from $PWD

This commit is contained in:
Peter Stephenson 2003-04-23 18:04:05 +00:00
parent 29a3496ebb
commit 5b5c0175d5
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2003-04-23 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
* IKEGAMI Tsutomu: SourceForge bug 722366: initialisation of pwd
from PWD in environment didn't metafy.
2003-04-23 Oliver Kiddle <opk@zsh.org>
* 18462: Completion/Unix/Command/_sh: complete files in addition

View file

@ -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);