Skip to content

Commit f2726d0

Browse files
committed
'main': Don't consider path_prefix in alias expansions.
1 parent 8184266 commit f2726d0

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
@@ -1196,6 +1196,7 @@ _zsh_highlight_main_highlighter_check_path()
11961196

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