summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/builtin.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 738d2048d..2845886cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-24 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 40404: Src/builtin.c: quoting of commands in whence should
+ only apply to whence -v.
+
2017-01-23 Peter Stephenson <p.stephenson@samsung.com>
* 40391: Completion/compinit, Doc/Zsh/builtins.yo,
diff --git a/Src/builtin.c b/Src/builtin.c
index 2fb1a70a4..219fbc98f 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);