From d9bc2d314e406d5ac11ffa1bfa27c898041e19cc Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 4 Mar 2002 15:52:57 +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. --- Src/builtin.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Src/builtin.c') 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 */ -- cgit 1.4.1