Open
Description
I was able to fix it with this
diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh
index f691051..505fe3c 100644
--- a/highlighters/main/main-highlighter.zsh
+++ b/highlighters/main/main-highlighter.zsh
@@ -196,6 +196,8 @@ _zsh_highlight_main__type() {
REPLY=builtin
elif (( $+commands[(e)$1] )); then
REPLY=command
+ elif (( $+nameddirs[(e)$1] )) && [[ -x $nameddirs[$1] ]]; then
+ REPLY=hashed
# None of the special hashes had a match, so fall back to 'type -w', for
# forward compatibility with future versions of zsh that may add new command
# types.
Though I'm not sure if that's the right approach, or whether that addresses it in the right place.
Additionally, cdablevars
appears to also not be respected (not sure whether this should be moved to a new issue but these both seem related so I'll keep it here)
Even with my patch above, it only is able to partially addresses this, since it appears that after entering into that directory, only then does it update the hash table (and once the hash table is updated, it gets highlighted, as shown below)
- zsh 5.9 (x86_64-pc-linux-gnu)
- zsh-syntax-highlighting commit 1386f12
Metadata
Metadata
Assignees
Labels
No labels