Replace non-POSIX '<<<' here strings with a regular pipeline

This commit is contained in:
Frank LENORMAND 2016-03-15 13:36:23 +02:00
parent 84a21f8cfb
commit 262de38c3d

View File

@ -63,7 +63,7 @@ def -hidden _modeline-parse %{
BOM BOM
) )
grep -qw "${key}" <<< "${OPTS_ALLOWED[@]}" || { printf %s "${OPTS_ALLOWED[@]}" | grep -qw "${key}" || {
printf %s "Unsupported kakoune variable: ${key}" >&2; printf %s "Unsupported kakoune variable: ${key}" >&2;
return; return;
} }
@ -77,9 +77,10 @@ def -hidden _modeline-parse %{
# It will also convert the ':' seperators beween the option=value pairs # It will also convert the ':' seperators beween the option=value pairs
# More info: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline # More info: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline
options=( options=(
$(sed -r -e 's/^(.+\s\w+:\s?(set?)?\s)//' \ $(printf %s "${kak_selection}" | sed -r \
-e 's/^(.+\s\w+:\s?(set?)?\s)//' \
-e 's/:?\s[^a-zA-Z0-9_=-]+$//' \ -e 's/:?\s[^a-zA-Z0-9_=-]+$//' \
-e 's/:/ /g' <<< "${kak_selection}") -e 's/:/ /g')
) )
case "${kak_selection}" in case "${kak_selection}" in