main: Honor shwordsplit when expanding parameters

Closes #687, #818.
This commit is contained in:
Matthew Martin
2021-06-28 23:02:31 -05:00
parent 0e1bb14452
commit f0e6a8ef5c
3 changed files with 44 additions and 2 deletions

View File

@@ -477,7 +477,11 @@ _zsh_highlight_main_highlighter__try_expand_parameter()
;;
(*)
# scalar, presumably
words=( ${(P)MATCH} )
if [[ $zsyh_user_options[shwordsplit] == on ]]; then
words=( ${(P)=MATCH} )
else
words=( ${(P)MATCH} )
fi
;;
esac
reply=( "${words[@]}" )