diff options
author | jilles <jilles@FreeBSD.org> | 2010-04-17 14:35:46 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-04-17 14:35:46 +0000 |
commit | 286029c47836178eb034bb3cff6b884f0a4ed74d (patch) | |
tree | bb356bbe40acadf8907130038ede6c0a505c1777 /bin/sh/cd.h | |
parent | 66c04c10a0daa86550d2714dec2c47bd88f184b3 (diff) | |
download | FreeBSD-src-286029c47836178eb034bb3cff6b884f0a4ed74d.zip FreeBSD-src-286029c47836178eb034bb3cff6b884f0a4ed74d.tar.gz |
sh: On startup of the shell, use PWD from the environment if it is valid.
Unset PWD if it is incorrect and no value for it can be determined.
This preserves the logical current directory across shell invocations.
Example (assuming /home is a symlink):
$ cd
$ pwd
/home/foo
$ sh
$ pwd
/home/foo
Formerly the second pwd would show the physical path (symlinks resolved).
Diffstat (limited to 'bin/sh/cd.h')
-rw-r--r-- | bin/sh/cd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/cd.h b/bin/sh/cd.h index 0a2d489..f88ce26 100644 --- a/bin/sh/cd.h +++ b/bin/sh/cd.h @@ -29,6 +29,6 @@ * $FreeBSD$ */ -char *getpwd(void); +void pwd_init(int); int cdcmd (int, char **); int pwdcmd(int, char **); |