zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] zshbuiltins(1): Document 'which''s "not found is not an error" behaviour.
Date: Mon, 24 Sep 2018 13:22:07 +0000	[thread overview]
Message-ID: <20180924132207.25349-1-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20180924125126eucas1p2e4ae5b63ce6320957ee99737f93181ae~XVwcoX7b91518615186eucas1p2T@eucas1p2.samsung.com>

---
 Doc/Zsh/builtins.yo | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 76b593fd2..0141305b4 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -2373,6 +2373,12 @@ item(tt(whence) [ tt(-vcwfpamsS) ] [ tt(-x) var(num) ] var(name) ...)(
 For each var(name), indicate how it would be interpreted if used as a
 command name.
 
+If var(name) is not an alias, built-in command, external command, shell
+function, hashed command, or a reserved word, the exit status shall be
+non-zero, and DASH()- if tt(-v), tt(-c), or tt(-w) was passed DASH()- a message
+will be written to standard output.  (This is different from other shells that
+write that message to standard error.)
+
 tt(whence) is most useful when var(name) is only the last path component
 of a command, i.e. does not include a `tt(/)'; in particular, pattern
 matching only succeeds if just the non-directory component of the command is

  reply	other threads:[~2018-09-24 13:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180924080113epcas4p4f8f89aa03a2cebc5030fd45dca0f6e84@epcas4p4.samsung.com>
2018-09-24  8:00 ` BUG: Shell builtin `which` prints non-existent commands to stdout Klaus Alexander Seistrup
2018-09-24 10:22   ` Peter Stephenson
2018-09-24 12:29     ` Klaus Alexander Seistrup
2018-09-24 12:51       ` Peter Stephenson
2018-09-24 13:22         ` Daniel Shahaf [this message]
2018-09-24 22:18         ` Stephane Chazelas
2018-09-25  7:56           ` Stephane Chazelas
2018-09-24 22:32         ` Stephane Chazelas
2018-09-25  9:10           ` Peter Stephenson
     [not found]   ` <20180924112218.7bac7f2c@camnpupstephen.cam.scsc.local>
2018-09-24 10:25     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180924132207.25349-1-danielsh@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).