Skip to content

Commit 53083da

Browse files
committed
'main': Highlight a broken symlink as a file.
Fixes zsh-users#342.
1 parent 95f7206 commit 53083da

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
@@ -582,6 +582,7 @@ _zsh_highlight_main_highlighter_check_path()
582582
REPLY=path
583583

584584
[[ -z $expanded_path ]] && return 1
585+
[[ -L $expanded_path ]] && return 0
585586
[[ -e $expanded_path ]] && return 0
586587

587588
# Search the path in CDPATH

highlighters/main/test-data/path-broken-symlink.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ BUFFER=': broken-symlink'
3232
CURSOR=5 # to make path_prefix ineligible
3333

3434
expected_region_highlight=(
35-
"3 16 path 'issue #342'" # broken-symlink
35+
"3 16 path" # broken-symlink
3636
)

0 commit comments

Comments
 (0)