From b1261773fdc78b4f747c2a15e9245f0018575635 Mon Sep 17 00:00:00 2001 From: Grafcube Date: Tue, 7 May 2024 11:05:18 +0530 Subject: [PATCH] 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. --- auto-notify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto-notify.plugin.zsh b/auto-notify.plugin.zsh index a2dc4c3..c1fdd4f 100644 --- a/auto-notify.plugin.zsh +++ b/auto-notify.plugin.zsh @@ -64,7 +64,7 @@ function _auto_notify_message() { icon_arg="--icon=$icon" 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 osascript \ -e 'on run argv' \