From 2411195c2092d64917cff3d8f904d63b78b195bf Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Tue, 12 Dec 2017 07:58:35 -0600 Subject: [PATCH] main: Expand paths before removing quoting Fixes highlighting of `ls \~`. Closes #328. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 50415d8..3171c20 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -923,7 +923,7 @@ _zsh_highlight_main_highlighter_expand_path() # The $~1 syntax normally performs filename generation, but not when it's on the right-hand side of ${x:=y}. setopt localoptions nonomatch unset REPLY - : ${REPLY:=${(Q)~1}} + : ${REPLY:=${(Q)${~1}}} } # -------------------------------------------------------------------------------------------------