Description
Currently, echo foo
paints foo
in 5 8 none
and echo "foo"
paints "foo"
in 5 10 none
5 10 fg=yellow
. These correspond to (default)
and (default double-quoted-argument)
in terms of styles.
This seems asymmetric, shouldn't there be some un-quoted-argument
style to parallel double-quoted-argument
? So the rule would be that each word gets a "word style" (single-hyphen-option, path, positional-argument) and "subword styles" for any ''
/$''
/""
-quoted portions thereof?
This is a consequence of the recent changes that made double-quoted-argument
a subword style; before that the only case resembling subword styles was dollar-double-quoted-argument: : "$foo"
→ typeset -a region_highlight=( '0 1 fg=green' '2 8 fg=yellow' '3 7 fg=cyan' )
. This case still exists, so things like rsync --"delete-${when}"
have three layers of nesting: double-hyphen-option, double-quoted-argument, dollar-double-quoted-argument.
Compare #362 (zstyle).