diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2002-03-04 15:52:57 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2002-03-04 15:52:57 +0000 |
commit | d9bc2d314e406d5ac11ffa1bfa27c898041e19cc (patch) | |
tree | 6caf0e299afb116a370c9355a0487efee6738a80 /Src | |
parent | e595143c423fcb9e8545e9aa21111a2da46578fe (diff) | |
download | zsh-d9bc2d314e406d5ac11ffa1bfa27c898041e19cc.tar.gz zsh-d9bc2d314e406d5ac11ffa1bfa27c898041e19cc.tar.xz zsh-d9bc2d314e406d5ac11ffa1bfa27c898041e19cc.zip |
16759: Src/builtin.c: from Eric Norum <eric.norum@usask.ca>:
cd prints output whenever the target directory is not obvious to the user. This confuses scripts, so restrict it to interactive mode.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index ce4d2a46e..cbc69b599 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1042,11 +1042,13 @@ cd_new_pwd(int func, LinkNode dir) pwd = new_pwd; set_pwd_env(); - if (unset(PUSHDSILENT) && func != BIN_CD && isset(INTERACTIVE)) - printdirstack(); - else if (doprintdir) { - fprintdir(pwd, stdout); - putchar('\n'); + if (isset(INTERACTIVE)) { + if (unset(PUSHDSILENT) && func != BIN_CD) + printdirstack(); + else if (doprintdir) { + fprintdir(pwd, stdout); + putchar('\n'); + } } /* execute the chpwd function */ |