* PATCH: silient popd when PUSHD_SILENT is set.
@ 2007-02-11 0:23 Felix Rosencrantz
0 siblings, 0 replies; only message in thread
From: Felix Rosencrantz @ 2007-02-11 0:23 UTC (permalink / raw)
To: Zsh hackers list
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
When PUSHD_SILENT is set, the popd command will still print something
if it is given an argument. Example:
zsh -f
% setopt PUSHD_SILENT
% pushd /etc/
% pushd /tmp
% pushd /
% popd
% popd +1
/tmp
%
This was noticed by Bart more than a decade ago in zsh-workers 2219:
http://www.zsh.org/mla/workers/1996/msg01519.html
Though there was never a response.
I think the attached patch will fix it.
-FR.
[-- Attachment #2: builtin_patch.txt --]
[-- Type: text/plain, Size: 624 bytes --]
Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.175
diff -u -r1.175 builtin.c
--- Src/builtin.c 6 Feb 2007 21:47:54 -0000 1.175
+++ Src/builtin.c 11 Feb 2007 00:17:57 -0000
@@ -1123,9 +1123,10 @@
set_pwd_env();
if (isset(INTERACTIVE)) {
- if (unset(PUSHDSILENT) && func != BIN_CD)
- printdirstack();
- else if (doprintdir) {
+ if (func != BIN_CD) {
+ if (unset(PUSHDSILENT))
+ printdirstack();
+ } else if (doprintdir) {
fprintdir(pwd, stdout);
putchar('\n');
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-11 0:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 0:23 PATCH: silient popd when PUSHD_SILENT is set Felix Rosencrantz
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).