mirror of
https://github.com/philippdieter/zsh-auto-notify.git
synced 2025-10-13 03:58:44 +00:00
use array argument expansion
This commit is contained in:
parent
43dbc4eb56
commit
6e5a54c5b5
@ -59,11 +59,13 @@ function _auto_notify_message() {
|
||||
transient=""
|
||||
icon=${AUTO_NOTIFY_ICON_FAILURE:-""}
|
||||
fi
|
||||
|
||||
local arguments=("$title" "$body" "--app-name=zsh" "$transient" "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME")
|
||||
|
||||
if [[ -n "$icon" ]]; then
|
||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" "--icon=$icon"
|
||||
else
|
||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
|
||||
arguments+=("--icon=$icon")
|
||||
fi
|
||||
notify-send ${arguments[@]}
|
||||
|
||||
elif [[ "$platform" == "Darwin" ]]; then
|
||||
osascript \
|
||||
|
Loading…
x
Reference in New Issue
Block a user