X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/a78e11404b7734f8d74a0117005b2ab05d5668ff..80f24036a08af64869bc8ad35713f61b808f6a75:/packages/termux-api/termux-notification diff --git a/packages/termux-api/termux-notification b/packages/termux-api/termux-notification index 9597ea50..dc77f29c 100755 --- a/packages/termux-api/termux-notification +++ b/packages/termux-api/termux-notification @@ -25,7 +25,6 @@ show_usage () { } OPT_ACTION="" -OPT_CONTENT="" OPT_ID="" OPT_LED_COLOR="" OPT_LED_OFF="" @@ -97,8 +96,9 @@ if [ -n "$OPT_SOUND" ]; then set -- "$@" --ez sound "$OPT_SOUND"; fi if [ -n "$OPT_TITLE" ]; then set -- "$@" --es title "$OPT_TITLE"; fi if [ -n "$OPT_VIBRATE" ]; then set -- "$@" --ela vibrate "$OPT_VIBRATE"; fi -if [ -n "$OPT_CONTENT" ]; then - echo $OPT_CONTENT | /data/data/com.termux/files/usr/libexec/termux-api Notification "$@" +if [ -v OPT_CONTENT ]; then + # Note that we want to accept an empty content (--content ""). + echo ${OPT_CONTENT:=""} | /data/data/com.termux/files/usr/libexec/termux-api Notification "$@" else /data/data/com.termux/files/usr/libexec/termux-api Notification "$@" fi