diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-29 05:47:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-29 05:47:46 +0000 |
commit | d3a25d6d2c969d3c630c20a085f0623ebef0a6f2 (patch) | |
tree | 712a96831f93c8f499fa701fb078a729cd31d686 /Src | |
parent | 931523b2136e9edfe50b1246f0f19907b33d20be (diff) | |
download | zsh-d3a25d6d2c969d3c630c20a085f0623ebef0a6f2.tar.gz zsh-d3a25d6d2c969d3c630c20a085f0623ebef0a6f2.tar.xz zsh-d3a25d6d2c969d3c630c20a085f0623ebef0a6f2.zip |
zsh-workers/8091
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |