This commit is contained in:
Daniel Shahaf 2017-12-12 01:22:29 +00:00 committed by GitHub
commit 7adf2d09db
5 changed files with 155 additions and 1 deletions

View file

@ -923,7 +923,11 @@ _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}}
if eval 'REPLY=${(e)~1}' 2>/dev/null; then
REPLY=${(Q)REPLY}
else
REPLY=$1
fi
}
# -------------------------------------------------------------------------------------------------