From 5b8f3e4af3ae03c6c619a9f932d87e3716d8299e Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 14 Aug 2015 15:44:19 -0400 Subject: [PATCH] termux-notification: Improve argument handling --- packages/termux-api/termux-notification | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/termux-api/termux-notification b/packages/termux-api/termux-notification index d186d5f04..420b6a55e 100755 --- a/packages/termux-api/termux-notification +++ b/packages/termux-api/termux-notification @@ -20,11 +20,11 @@ if [ $? != 0 ] ; then show_usage; exit 1 ; fi eval set -- "$O" while true; do case "$1" in - -c|--content) PARAMS="$PARAMS --es content $2"; CONTENT_OR_TITLE_SET=yes; shift 2;; + -c|--content) PARAMS="$PARAMS --es content '$2'"; CONTENT_OR_TITLE_SET=yes; shift 2;; -h|--help) show_usage; exit 0;; -i|--id) PARAMS="$PARAMS --es id $2"; shift 2;; - -t|--title) PARAMS="$PARAMS --es title $2"; CONTENT_OR_TITLE_SET=yes; shift 2;; - -u|--url) PARAMS="$PARAMS --es url $2"; shift 2;; + -t|--title) PARAMS="$PARAMS --es title '$2'"; CONTENT_OR_TITLE_SET=yes; shift 2;; + -u|--url) PARAMS="$PARAMS --es url '$2'"; shift 2;; --) shift; break;; *) echo Error; exit 1;; esac @@ -35,4 +35,4 @@ if [ $CONTENT_OR_TITLE_SET = "no" ]; then exit 1; fi; -@TERMUX_API@ Notification $PARAMS +eval @TERMUX_API@ Notification $PARAMS