zsh-workers
 help / color / mirror / code / Atom feed
* whence -S but not for which or where
@ 2015-01-20 16:53 Oliver Kiddle
  2015-01-20 17:11 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2015-01-20 16:53 UTC (permalink / raw)
  To: Zsh workers

Was it intentional or an oversight that the new -S option does not apply
to the which and where builtin commands?

They imply the -c and -ca options respectively. It doesn't seem to
conflict with that in any way.

Oliver


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

* Re: whence -S but not for which or where
  2015-01-20 16:53 whence -S but not for which or where Oliver Kiddle
@ 2015-01-20 17:11 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2015-01-20 17:11 UTC (permalink / raw)
  To: Zsh workers

On Tue, 20 Jan 2015 17:53:19 +0100
Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> Was it intentional or an oversight that the new -S option does not apply
> to the which and where builtin commands?

Neither; they simply didn't come into the picture at the time.

As they support -S, there's no reason why they shouldn't also be
extended.

pws

diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 49c2c11..dc39371 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -2139,11 +2139,11 @@ symlink resolved at each step might be anywhere in the path.
 enditem()
 )
 findex(where)
-item(tt(where) [ tt(-wpms) ] var(name) ...)(
+item(tt(where) [ tt(-wpmsS) ] var(name) ...)(
 Equivalent to tt(whence -ca).
 )
 findex(which)
-item(tt(which) [ tt(-wpams) ] var(name) ...)(
+item(tt(which) [ tt(-wpamsS) ] var(name) ...)(
 Equivalent to tt(whence -c).
 )
 findex(zcompile)
diff --git a/Src/builtin.c b/Src/builtin.c
index 9258ddb..1818941 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -129,8 +129,8 @@ static struct builtin builtins[] =
     BUILTIN("unsetopt", 0, bin_setopt, 0, -1, BIN_UNSETOPT, NULL, NULL),
     BUILTIN("wait", 0, bin_fg, 0, -1, BIN_WAIT, NULL, NULL),
     BUILTIN("whence", 0, bin_whence, 0, -1, 0, "acmpvfsSw", NULL),
-    BUILTIN("where", 0, bin_whence, 0, -1, 0, "pmsw", "ca"),
-    BUILTIN("which", 0, bin_whence, 0, -1, 0, "ampsw", "c"),
+    BUILTIN("where", 0, bin_whence, 0, -1, 0, "pmsSw", "ca"),
+    BUILTIN("which", 0, bin_whence, 0, -1, 0, "ampsSw", "c"),
     BUILTIN("zmodload", 0, bin_zmodload, 0, -1, 0, "AFRILP:abcfdilmpue", NULL),
     BUILTIN("zcompile", 0, bin_zcompile, 0, -1, 0, "tUMRcmzka", NULL),
 };


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

end of thread, other threads:[~2015-01-20 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 16:53 whence -S but not for which or where Oliver Kiddle
2015-01-20 17:11 ` Peter Stephenson

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