From 15630b234ad7d2e91b165ba0bf584ee0e6e6efce Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 4 Mar 2002 15:51:58 +0000 Subject: 16759: Src/builtin.c: from Eric Norum : cd prints output whenever the target directory is not obvious to the user. This confuses scripts, so restrict it to interactive mode. --- ChangeLog | 7 +++++++ Src/builtin.c | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86ad59746..d4cda0a26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-03-04 Peter Stephenson + + * 16759: Src/builtin.c: from Eric Norum : + cd prints output whenever the target directory is not obvious + to the user. This confuses scripts, so restrict it to + interactive mode. + 2002-03-04 Sven Wischnowsky * 16755: Completion/compdump, Completion/compinit, 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 */ -- cgit 1.4.1