This commit is contained in:
Matthew Martin 2024-11-22 14:14:09 +00:00 committed by GitHub
commit 659376eeab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View file

@ -1815,8 +1815,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 [[ ${1[1]} == '~' ]]; then
REPLY=${~${(Q)1}}
else
REPLY=${(Q)1}
fi
}
# -------------------------------------------------------------------------------------------------