use array argument expansion
This commit is contained in:
parent
43dbc4eb56
commit
6e5a54c5b5
1 changed files with 5 additions and 3 deletions
|
@ -59,11 +59,13 @@ function _auto_notify_message() {
|
||||||
transient=""
|
transient=""
|
||||||
icon=${AUTO_NOTIFY_ICON_FAILURE:-""}
|
icon=${AUTO_NOTIFY_ICON_FAILURE:-""}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local arguments=("$title" "$body" "--app-name=zsh" "$transient" "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME")
|
||||||
|
|
||||||
if [[ -n "$icon" ]]; then
|
if [[ -n "$icon" ]]; then
|
||||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" "--icon=$icon"
|
arguments+=("--icon=$icon")
|
||||||
else
|
|
||||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
|
|
||||||
fi
|
fi
|
||||||
|
notify-send ${arguments[@]}
|
||||||
|
|
||||||
elif [[ "$platform" == "Darwin" ]]; then
|
elif [[ "$platform" == "Darwin" ]]; then
|
||||||
osascript \
|
osascript \
|
||||||
|
|
Loading…
Add table
Reference in a new issue