Skip to content

Commit 6323686

Browse files
committed
'main': Don't consider path_prefix in alias expansions.
1 parent 59aea75 commit 6323686

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
@@ -1153,6 +1153,7 @@ _zsh_highlight_main_highlighter_check_path()
11531153

11541154
# If this word ends the buffer, check if it's the prefix of a valid path.
11551155
if (( has_end && (len == end_pos) )) &&
1156+
(( ! in_alias )) &&
11561157
[[ $WIDGET != zle-line-finish ]]; then
11571158
# TODO: When we've dropped support for pre-5.0.6 zsh, use the *(Y1) glob qualifier here.
11581159
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)