mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Tighten numeric regex
This commit is contained in:
parent
6ccd2fa439
commit
27f42beb81
|
|
@ -64,7 +64,7 @@ EOL
|
|||
;;
|
||||
esac
|
||||
|
||||
if [[ ! $parm2 =~ [1-9]*([0-9]) ]]; then
|
||||
if [[ ! $parm2 =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "Invalid undo count: $parm2"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue