Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added flag to change sms sort order #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/termux-sms-list.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ SCRIPTNAME=termux-sms-list

SUPPORTED_TYPES="all|inbox|sent|draft|outbox"
show_usage () {
echo "Usage: $SCRIPTNAME [-d] [-l limit] [-n] [-o offset] [-t type] [-c] [-f number]"
echo "Usage: $SCRIPTNAME [-d] [-l limit] [-n] [-o offset] [-t type] [-c] [-f number] [-a]"
echo "List SMS messages."
echo " -l limit limit in retrieved sms list (default: $PARAM_LIMIT)"
echo " -o offset offset in sms list (default: $PARAM_OFFSET)"
echo " -t type the type of messages to list (default: $PARAM_TYPE):"
echo " $SUPPORTED_TYPES"
echo " -c conversation list (unique item per conversation)"
echo " -f number the number for locate messages"
echo " -a sorts by date in asc order"

echo " -n (obsolete) show phone numbers"
echo " -d (obsolete) show dates when messages were created"
exit 0
}

while getopts :hdl:t:f:cno: option
while getopts :hdl:t:f:cnoa: option
do
case "$option" in
h) show_usage;;
Expand All @@ -36,6 +37,7 @@ do
c) PARAMS="$PARAMS --ez conversation-list true";;
n) PARAMS="$PARAMS --ez show-phone-numbers true";;
o) PARAM_OFFSET=$OPTARG;;
a) PARAMS="$PARAMS --ez date-asc true";;
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
esac
done
Expand Down