aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-21 20:00:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-21 20:00:50 -0300
commitc7d8b082cc33d574b2c8f4e6be10673017c44e38 (patch)
tree767ca7bd47b4bcfa7c1489c58619d2e3fe5ebc71
parent23a657dbd1d3e32e3ea35e1ab026748e778c8666 (diff)
downloadutils-x11-c7d8b082cc33d574b2c8f4e6be10673017c44e38.tar.gz
utils-x11-c7d8b082cc33d574b2c8f4e6be10673017c44e38.tar.bz2
More options to xlarm
-rwxr-xr-xxalarm6
1 files changed, 3 insertions, 3 deletions
diff --git a/xalarm b/xalarm
index ccc2116..87b0237 100755
--- a/xalarm
+++ b/xalarm
@@ -121,7 +121,7 @@ function xalarm_reset_loop {
# Usage
function xalarm_usage {
- echo "usage: $BASENAME [list|cancel|kill|help|usage|loop|reset|reset-loop] [timedef] [message]"
+ echo "usage: $BASENAME [list|cancel|kill|resume|continue|help|usage|loop|reset|reset-loop] [timedef] [message]"
exit 1
}
@@ -145,13 +145,13 @@ trap xalarm_sigusr1 SIGUSR1
trap xalarm_sigusr2 SIGUSR2
# Dispatch
-if [ "$1" == "list" ]; then
+if [ -z "$1" ] || [ "$1" == "list" ]; then
xalarm_list
elif [ "$1" == "cancel" ] || [ "$1" == "kill" ]; then
xalarm_cancel $2
elif [ "$1" == "pause" ]; then
xalarm_pause $2
-elif [ "$1" == "resume" ]; then
+elif [ "$1" == "resume" ] && [ "$1" == "continue" ]; then
xalarm_resume $2
elif [ "$1" == "reset" ]; then
xalarm_reset $2