Skip to content

Commit 41974a3

Browse files
committed
'main': Don't consider path_prefix in alias expansions.
1 parent fe0a314 commit 41974a3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

highlighters/main/main-highlighter.zsh

+1
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ _zsh_highlight_main_highlighter_check_path()
11821182

11831183
# If this word ends the buffer, check if it's the prefix of a valid path.
11841184
if (( has_end && (len == end_pos) )) &&
1185+
(( ! in_alias )) &&
11851186
[[ $WIDGET != zle-line-finish ]]; then
11861187
# TODO: When we've dropped support for pre-5.0.6 zsh, use the *(Y1) glob qualifier here.
11871188
local -a tmp

highlighters/main/test-data/alias-to-dir.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ alias x=/
3232
BUFFER=$'x'
3333

3434
expected_region_highlight=(
35-
'1 1 unknown-token "issue #668"' # x (/)
35+
'1 1 unknown-token' # x (/)
3636
)

0 commit comments

Comments
 (0)