Hi,
The one-line change in the patch below fixes it, to the best of my
knowledge. 'command' is handled by the c_whence() function. The problem
was in the conversion of 'command' flags to 'whence' behaviour. Shell
keyword (a.k.a. reserved word) search was unjustly limited to only
'whence' or 'command -V', with 'command -v' excluded.
Thanks,
- M.
--- mksh.orig/funcs.c 2015-04-19 21:18:41.0 +0200
+++ mksh/funcs.c2015-06-30 23:59:19.0 +0200
@@ -538,7 +538,7 @@
uint32_t h = 0;
tp = NULL;
- if ((iam_whence || vflag) !pflag)
+ if (!pflag)
tp = ktsearch(keywords, id, h = hash(id));
if (!tp !pflag) {
tp = ktsearch(aliases, id, h ? h : hash(id));