rc spell: Don't use expr
to format-check
The regular pattern based on `printf`/`grep` is cleaner and less error prone.
This commit is contained in:
parent
b6041e60ac
commit
7db9062122
|
@ -121,7 +121,7 @@ define-command spell-next %{ evaluate-commands %sh{
|
||||||
}
|
}
|
||||||
|
|
||||||
# no selection descriptions are in `spell_regions`
|
# no selection descriptions are in `spell_regions`
|
||||||
if ! expr "${start_first}" : '[0-9][0-9]*\.[0-9][0-9]*,[0-9][0-9]*\.[0-9]' >/dev/null; then
|
if ! printf %s "${start_first}" | grep -qE '^[0-9]+\.[0-9]+,[0-9]+\.[0-9]+$'; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user