We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62e2d05 commit f56e3faCopy full SHA for f56e3fa
highlighters/main/main-highlighter.zsh
@@ -1117,9 +1117,10 @@ _zsh_highlight_main_highlighter_check_path()
1117
# If this word ends the buffer, check if it's the prefix of a valid path.
1118
if (( has_end && (len == end_pos) )) &&
1119
[[ $WIDGET != zle-line-finish ]]; then
1120
+ # TODO: When we've dropped support for pre-5.0.6 zsh, use the *(Y1) glob qualifier here.
1121
local -a tmp
1122
tmp=( ${expanded_path}*(N) )
- (( $#tmp > 0 )) && REPLY=path_prefix && return 0
1123
+ (( ${+tmp[1]} )) && REPLY=path_prefix && return 0
1124
fi
1125
1126
# It's not a path.
0 commit comments