summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c4
-rw-r--r--Src/options.c1
-rw-r--r--Src/zsh.h1
3 files changed, 4 insertions, 2 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 8dcdcc024..49f017046 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -720,7 +720,7 @@ bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
/**** directory-handling builtins ****/
/**/
-int doprintdir = 0; /* set in exec.c (for autocd) */
+int doprintdir = 0; /* set in exec.c (for autocd, cdpath, etc.) */
/* pwd: display the name of the current directory */
@@ -1251,7 +1251,7 @@ cd_new_pwd(int func, LinkNode dir, int quiet)
if (func != BIN_CD && isset(INTERACTIVE)) {
if (unset(PUSHDSILENT) && !quiet)
printdirstack();
- } else if (doprintdir) {
+ } else if (unset(CDSILENT) && doprintdir) {
fprintdir(pwd, stdout);
putchar('\n');
}
diff --git a/Src/options.c b/Src/options.c
index 600b649e4..48c14c179 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -108,6 +108,7 @@ static struct optname optns[] = {
{{NULL, "cbases", 0}, CBASES},
{{NULL, "cprecedences", OPT_EMULATE|OPT_NONZSH}, CPRECEDENCES},
{{NULL, "cdablevars", OPT_EMULATE}, CDABLEVARS},
+{{NULL, "cdsilent", 0}, CDSILENT},
{{NULL, "chasedots", OPT_EMULATE}, CHASEDOTS},
{{NULL, "chaselinks", OPT_EMULATE}, CHASELINKS},
{{NULL, "checkjobs", OPT_EMULATE|OPT_ZSH}, CHECKJOBS},
diff --git a/Src/zsh.h b/Src/zsh.h
index 10897372b..fc3ed2127 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -2348,6 +2348,7 @@ enum {
CASEMATCH,
CBASES,
CDABLEVARS,
+ CDSILENT,
CHASEDOTS,
CHASELINKS,
CHECKJOBS,