diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 0222160..d6c3f23 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -1196,6 +1196,7 @@ _zsh_highlight_main_highlighter_check_path() # If this word ends the buffer, check if it's the prefix of a valid path. if (( has_end && (len == end_pos) )) && + (( ! in_alias )) && [[ $WIDGET != zle-line-finish ]]; then # TODO: When we've dropped support for pre-5.0.6 zsh, use the *(Y1) glob qualifier here. local -a tmp diff --git a/highlighters/main/test-data/alias-to-dir.zsh b/highlighters/main/test-data/alias-to-dir.zsh index bfa6e07..30390d4 100644 --- a/highlighters/main/test-data/alias-to-dir.zsh +++ b/highlighters/main/test-data/alias-to-dir.zsh @@ -32,5 +32,5 @@ alias x=/ BUFFER=$'x' expected_region_highlight=( - '1 1 unknown-token "issue #668"' # x (/) + '1 1 unknown-token' # x (/) )