mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-15 23:11:26 +01:00
52999: import OLDPWD from environment if set
This commit is contained in:
parent
09c5b10dc2
commit
0bb140f991
2 changed files with 10 additions and 1 deletions
|
|
@ -1245,7 +1245,11 @@ setupvals(char *cmd, char *runscript, char *zsh_name)
|
|||
pwd = metafy(zgetcwd(), -1, META_DUP);
|
||||
}
|
||||
|
||||
oldpwd = ztrdup(pwd); /* initialize `OLDPWD' = `PWD' */
|
||||
oldpwd = zgetenv("OLDPWD");
|
||||
if (oldpwd == NULL)
|
||||
oldpwd = ztrdup(pwd); /* initialize `OLDPWD' = `PWD' */
|
||||
else
|
||||
oldpwd = ztrdup(oldpwd);
|
||||
|
||||
inittyptab(); /* initialize the ztypes table */
|
||||
initlextabs(); /* initialize lexing tables */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue