From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] print errors to stderr
Date: Thu, 23 Jun 2016 12:04:45 +0200 [thread overview]
Message-ID: <30203.1466676285@thecus.kiddle.eu> (raw)
In-Reply-To: <160622101417.ZM12222@torch.brasslantern.com>
Bart wrote:
> } I think this behaviour is actually intentional. It is arguably not an
> } error - the whence command's purpose is to search for something and
> } report on whether it is found. So it doesn't rely on finding it. Also,
> } this is compatible with csh and tcsh - the which command was a csh thing
> } first.
>
> Maybe it's time for either the doc or a code comment to explain this,
Sounds sensible.
Oliver
diff --git a/Src/builtin.c b/Src/builtin.c
index c2fb81e..bfb9e69 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3633,6 +3633,7 @@ bin_whence(char *nam, char **argv, Options ops, int func)
}
}
if (!informed && (wd || v || csh)) {
+ /* this is information and not an error so, as in csh, use stdout */
zputs(*argv, stdout);
puts(wd ? ": none" : " not found");
returnval = 1;
@@ -3652,7 +3653,7 @@ bin_whence(char *nam, char **argv, Options ops, int func)
}
informed = 1;
} else {
- /* Not found at all. */
+ /* Not found at all. That's not an error as such so this goes to stdout */
if (v || csh || wd)
zputs(*argv, stdout), puts(wd ? ": none" : " not found");
returnval = 1;
prev parent reply other threads:[~2016-06-23 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 6:53 isabella parakiss
2016-06-22 7:42 ` Oliver Kiddle
2016-06-22 17:14 ` Bart Schaefer
2016-06-23 10:04 ` Oliver Kiddle [this message]
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=30203.1466676285@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--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).