Allow phone number find in send text submenu
This allow the user to use a non formated phone number. We split valid number check in a dedicated script to allow this.
This commit is contained in:
parent
55985a8f20
commit
87d86b7cf0
3 changed files with 30 additions and 28 deletions
|
@ -29,12 +29,12 @@ choosenumbermenu() {
|
|||
)"
|
||||
fi
|
||||
|
||||
if echo "$NUMBER" | grep -q "Cancel"; then
|
||||
if printf %s "$NUMBER" | grep -q "Cancel"; then
|
||||
exit 1
|
||||
elif ! echo "$NUMBER" | grep -qE '^[+0-9]+$'; then
|
||||
notify-send "That doesn't seem like a valid number"
|
||||
elif NUMBER="$(sxmo_validnumber.sh "$NUMBER")"; then
|
||||
printf %s "$NUMBER"
|
||||
else
|
||||
echo "$NUMBER"
|
||||
notify-send "That doesn't seem like a valid number"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue