diff options
Diffstat (limited to 'Src/builtin.c')
-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 564edfb46..b2815c155 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1059,11 +1059,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 */ |