about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-06-29 17:04:50 +0200
committerOliver Kiddle <opk@zsh.org>2016-06-29 17:04:50 +0200
commit5ea32ce2fcd527e9b6e6991c007d296afc5aa44d (patch)
tree6f742e4f3a40cadc9a9a7bdc5b611e6c6510eba1 /Src/builtin.c
parent3a034838b4a76924a7fff98c269c9c3ea3136d45 (diff)
downloadzsh-5ea32ce2fcd527e9b6e6991c007d296afc5aa44d.tar.gz
zsh-5ea32ce2fcd527e9b6e6991c007d296afc5aa44d.tar.xz
zsh-5ea32ce2fcd527e9b6e6991c007d296afc5aa44d.zip
38752: add comments to explain use of stdout instead of stderr for the which builtin
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index c2fb81ed1..bfb9e6929 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;