zsh-workers
 help / color / mirror / code / Atom feed
* Suggestion: CD_SILENT option.
@ 1996-07-25  8:28 Andrej Borsenkow
  1996-07-25 15:15 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1996-07-25  8:28 UTC (permalink / raw)
  To: Zsh workers mailing list

Hi!

Just small suggestion - add CD_SILENT option to make `cd' silently change
to non-local directory (using CDPATH).

Rationale: almost everybody includes some indication of current directory
in prompt. As in zsh it is much more easier/elegant to do it as in other
shells I know of, this printing of `cd' is just unneccessary. It just
wastes line on terminal.

I include diffs against zsh-3.0-pre3 just in case ;) (Sorry, cannot
include diffs to info/man - no idea how to do it).

greetings

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
===================================================
--- Src/builtin.c.org	Thu Jul 18 13:54:18 1996
+++ Src/builtin.c	Thu Jul 25 10:39:56 1996
@@ -1258,7 +1258,7 @@
 	pm->env = replenv(pm->env, oldpwd);
     if (unset(PUSHDSILENT) && func != BIN_CD && isset(INTERACTIVE))
 	printdirstack();
-    else if (doprintdir) {
+    else if (unset(CDSILENT) && doprintdir) {
 	fprintdir(pwd, stdout);
         putchar('\n');
     }
--- Src/globals.h.org	Thu Jul 18 13:54:19 1996
+++ Src/globals.h	Thu Jul 25 10:40:39 1996
@@ -677,6 +677,7 @@
     {"braceccl", 		0,   0,   0},
     {"bsdecho", 		0,   0,   OPT_EMULATE|OPT_SH},
     {"cdablevars", 		'T', 0,   0},
+    {"cdsilent", 		0,   0,   0},
     {"chaselinks", 		'w', 0,   0},
     {"completealiases", 	0,   0,   0},
     {"completeinword", 		0,   0,   0},
--- Src/zsh.h.org	Thu Jul 18 13:54:24 1996
+++ Src/zsh.h	Thu Jul 25 10:41:01 1996
@@ -1052,6 +1052,7 @@
     BRACECCL,
     BSDECHO,
     CDABLEVARS,
+    CDSILENT,
     CHASELINKS,
     COMPLETEALIASES,
     COMPLETEINWORD,




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suggestion: CD_SILENT option.
  1996-07-25  8:28 Suggestion: CD_SILENT option Andrej Borsenkow
@ 1996-07-25 15:15 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-07-25 15:15 UTC (permalink / raw)
  To: borsenkow.msk; +Cc: zsh-workers

> Just small suggestion - add CD_SILENT option to make `cd' silently change
> to non-local directory (using CDPATH).

It is really unnecessary since it can be done by a shell function wrapper
around cd.  Just redirect the output of cd.  That message goes to stdout so
if you redirect only that error messages are still visible o stderr.

Example:

cd () { builtin cd "$@" > /dev/null ; }

Zoltan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-07-25 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-25  8:28 Suggestion: CD_SILENT option Andrej Borsenkow
1996-07-25 15:15 ` Zoltan Hidvegi

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).