From d3a25d6d2c969d3c630c20a085f0623ebef0a6f2 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 29 Sep 1999 05:47:46 +0000 Subject: zsh-workers/8091 --- Src/exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 710402f86..7a6ed15e4 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1692,14 +1692,16 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) if (!hn) { /* Resolve external commands */ char *cmdarg = (char *) peekfirst(args); + int dohashcmd = isset(HASHCMDS); hn = cmdnamtab->getnode(cmdnamtab, cmdarg); if (hn && trycd && !isreallycom((Cmdnam)hn)) { cmdnamtab->removenode(cmdnamtab, cmdarg); cmdnamtab->freenode(hn); hn = NULL; + dohashcmd = 1; } - if (!hn && isset(HASHCMDS) && strcmp(cmdarg, "..")) { + if (!hn && dohashcmd && strcmp(cmdarg, "..")) { for (s = cmdarg; *s && *s != '/'; s++); if (!*s) hn = (HashNode) hashcmd(cmdarg, pathchecked); -- cgit 1.4.1