Add more contacts choice to contact list

The dialer only included recent callers, but there was no way to access
the full contact list (contacts.tsv). I added a "more contacts" options
that calls sxmo_contacts --all, providing an alphabetically sorted list
of all your contacts. It also works for the texting menu.

This is a cleaned up version of an earlier patch by Maarten van Gompel.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Reed Wade 2020-10-30 12:06:56 +01:00 committed by Maarten van Gompel
parent 0e4406bffa
commit 65d9d60ff1
3 changed files with 28 additions and 6 deletions

View file

@ -28,4 +28,14 @@ contacts() {
' "$CONTACTSFILE" -
}
contacts
all_contacts() {
cat "$CONTACTSFILE" | awk -F'\t' '{
if (substr($0,1,1) == "+") print $1 ": " $2
}' | sort -f -k 2
}
if [ "$1" = "--all" ]; then
all_contacts
else
contacts
fi