cleanup: Avoid colon after parameter expansion to avoid risking introducing a colon modifier.
This commit is contained in:
parent
38c8fbea2d
commit
c54c076cfa
@ -148,14 +148,14 @@ _zsh_highlight_apply_zle_highlight() {
|
|||||||
integer first="$3" second="$4"
|
integer first="$3" second="$4"
|
||||||
|
|
||||||
# read the relevant entry from zle_highlight
|
# read the relevant entry from zle_highlight
|
||||||
local region="${zle_highlight[(r)$entry:*]}"
|
local region="${zle_highlight[(r)${entry}:*]}"
|
||||||
|
|
||||||
if [[ -z "$region" ]]; then
|
if [[ -z "$region" ]]; then
|
||||||
# entry not specified at all, use default value
|
# entry not specified at all, use default value
|
||||||
region=$default
|
region=$default
|
||||||
else
|
else
|
||||||
# strip prefix
|
# strip prefix
|
||||||
region="${region#$entry:}"
|
region="${region#${entry}:}"
|
||||||
|
|
||||||
# no highlighting when set to the empty string or to 'none'
|
# no highlighting when set to the empty string or to 'none'
|
||||||
if [[ -z "$region" ]] || [[ "$region" == none ]]; then
|
if [[ -z "$region" ]] || [[ "$region" == none ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user