Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh CORRECT option is unaware of AUTO_CD and CDABLE_VARS




> 2019/08/27 11:59、I wrote:
> 
> I hope this has no obvious bad side effects.

Sorry, is this better?


diff --git a/Src/utils.c b/Src/utils.c
index 46cf7bcf6..2c4726fa0 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3159,6 +3159,8 @@ spckword(char **s, int hist, int cmd, int ask)
 	    scanhashtable(cmdnamtab, 1, 0, 0, spscan, 0);
 	    if (autocd) {
 		char **pp;
+		if (cd_able_vars(guess))
+		    return;
 		for (pp = cdpath; *pp; pp++) {
 		    char bestcd[PATH_MAX + 1];
 		    int thisdist;





Messages sorted by: Reverse Date, Date, Thread, Author