-
Notifications
You must be signed in to change notification settings - Fork 436
termux-notification-channel: Replace word splitting with an array #209
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
base: master
Are you sure you want to change the base?
Conversation
…th an array This will allow user to create notification channels with spaces in their names.
asrar-mared
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| exit 0 | ||
| } | ||
|
|
||
| ARGS="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
الملفات المتغيرة
| exit 0 | ||
| } | ||
|
|
||
| ARGS="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARGS=()
| if [ "$1" = "-d" ]; then | ||
| shift | ||
| if [ $# == 1 ]; then | ||
| ARGS="--ez delete true --es id $1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARGS=(--ez delete true --es id "$1")
| fi | ||
| else | ||
| if [ $# == 2 ]; then | ||
| ARGS="--es id $1 --es name $2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARGS=(--es id "$1" --es name "$2")
|
|
||
|
|
||
| @TERMUX_PREFIX@/libexec/termux-api NotificationChannel $ARGS | ||
| @TERMUX_PREFIX@/libexec/termux-api NotificationChannel "${ARGS[@]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
الملفات المتغيرة
| fi | ||
|
|
||
|
|
||
| @TERMUX_PREFIX@/libexec/termux-api NotificationChannel $ARGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TERMUX_PREFIX@/libexec/termux-api NotificationChannel "${ARGS[@]}"
This change will allow creating notification channels with spaces in their names.