Unquote $icon in notify-send command

If `AUTO_NOTIFY_ICON_SUCCESS` or `AUTO_NOTIFY_ICON_FAILURE` is not set,
the command fails with `Invalid number of options` since `$icon` is empty.
This commit is contained in:
Grafcube 2024-05-07 11:05:18 +05:30
parent 452eee9454
commit b1261773fd
No known key found for this signature in database
GPG key ID: E383688F2878A440

View file

@ -64,7 +64,7 @@ function _auto_notify_message() {
icon_arg="--icon=$icon" icon_arg="--icon=$icon"
fi fi
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" "$icon_arg" notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" $icon_arg
elif [[ "$platform" == "Darwin" ]]; then elif [[ "$platform" == "Darwin" ]]; then
osascript \ osascript \
-e 'on run argv' \ -e 'on run argv' \