From 37d6108215b99dbb14e1aa12a83f7677bfc9f0e2 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 16 Mar 2019 07:34:12 +0000 Subject: [PATCH] 'main': Work around a zsh bug reported to us as #606. As of this writing, it seems that the 'type' builtin poisons the commands hash in a way that breaks AUTO_CD to absolute paths that don't end with a slash. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 6bf02f0..477b309 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -180,7 +180,7 @@ _zsh_highlight_main__type() { # # The first disjunct mimics the isrelative() C call from the zsh bug. elif { [[ $1 != */* ]] || is-at-least 5.3 } && - ! builtin type -w -- $1 >/dev/null 2>&1; then + ! (builtin type -w -- $1) >/dev/null 2>&1; then REPLY=none fi fi