Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: silient popd when PUSHD_SILENT is set.
- X-seq: zsh-workers 23164
- From: "Felix Rosencrantz" <f.rosencrantz@xxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: silient popd when PUSHD_SILENT is set.
- Date: Sat, 10 Feb 2007 16:23:12 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Ue3bQzrFRpjGnW5vNgSu4WG4hiUlxgOskQucYrbZ0QaP55DunhKRdQQ7+HH95DPNMmVXhNlCJG0XbgO32nnsYGUd0tSJLdXlH2QPAtZ4Fb5z51MAvs8F2w0k1jaqSpGJddSVXi4eAv1sV13/z24g5DXqBL9Q+mO6xpiwAbEr8XI=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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.
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');
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author