diff options
Diffstat (limited to '')
-rw-r--r-- | src/exec.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/exec.c b/src/exec.c index ec0eadd..e9e29b7 100644 --- a/src/exec.c +++ b/src/exec.c @@ -743,8 +743,6 @@ describe_command(out, command, path, verbose) struct tblentry *cmdp; const struct alias *ap; - path = path ?: pathval(); - if (verbose) { outstr(command, out); } @@ -767,8 +765,17 @@ describe_command(out, command, path, verbose) goto out; } - /* Then check if it is a tracked alias */ - if ((cmdp = cmdlookup(command, 0)) != NULL) { + /* Then if the standard search path is used, check if it is + * a tracked alias. + */ + if (path == NULL) { + path = pathval(); + cmdp = cmdlookup(command, 0); + } else { + cmdp = NULL; + } + + if (cmdp != NULL) { entry.cmdtype = cmdp->cmdtype; entry.u = cmdp->param; } else { |