From 53083da8215e3a32a3d515ce06439a2609cd209b Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 20 Jul 2016 02:00:56 +0000 Subject: [PATCH] 'main': Highlight a broken symlink as a file. Fixes #342. --- highlighters/main/main-highlighter.zsh | 1 + highlighters/main/test-data/path-broken-symlink.zsh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 540e05b..e1ff409 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -582,6 +582,7 @@ _zsh_highlight_main_highlighter_check_path() REPLY=path [[ -z $expanded_path ]] && return 1 + [[ -L $expanded_path ]] && return 0 [[ -e $expanded_path ]] && return 0 # Search the path in CDPATH diff --git a/highlighters/main/test-data/path-broken-symlink.zsh b/highlighters/main/test-data/path-broken-symlink.zsh index 79a790e..84c7d59 100644 --- a/highlighters/main/test-data/path-broken-symlink.zsh +++ b/highlighters/main/test-data/path-broken-symlink.zsh @@ -32,5 +32,5 @@ BUFFER=': broken-symlink' CURSOR=5 # to make path_prefix ineligible expected_region_highlight=( - "3 16 path 'issue #342'" # broken-symlink + "3 16 path" # broken-symlink )