Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATH: autoload with explicit path
On Tue, 24 Jan 2017 11:17:34 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> This patch is probably a bad idea, it's extremely common to do this:
> PROGRAM="$(which program)"
> and with the above change that no longer works.
Yes, that was supposed to be limited to the chattier -v output.
pws
diff --git a/Src/builtin.c b/Src/builtin.c
index 2fb1a70..219fbc9 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3774,9 +3774,11 @@ bin_whence(char *nam, char **argv, Options ops, int func)
if (wd) {
printf("%s: command\n", *argv);
} else {
- if (v && !csh)
+ if (v && !csh) {
zputs(*argv, stdout), fputs(" is ", stdout);
- quotedzputs(buf, stdout);
+ quotedzputs(buf, stdout);
+ } else
+ zputs(buf, stdout);
if (OPT_ISSET(ops,'s') || OPT_ISSET(ops, 'S'))
print_if_link(buf, OPT_ISSET(ops, 'S'));
fputc('\n', stdout);
@@ -3806,9 +3808,11 @@ bin_whence(char *nam, char **argv, Options ops, int func)
if (wd) {
printf("%s: command\n", *argv);
} else {
- if (v && !csh)
+ if (v && !csh) {
zputs(*argv, stdout), fputs(" is ", stdout);
- quotedzputs(cnam, stdout);
+ quotedzputs(cnam, stdout);
+ } else
+ zputs(cnam, stdout);
if (OPT_ISSET(ops,'s') || OPT_ISSET(ops,'S'))
print_if_link(cnam, OPT_ISSET(ops,'S'));
fputc('\n', stdout);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author