MichaelAquilina / zsh-auto-notify

⏰ ZSH plugin that automatically sends out a notification when a long running task has completed.
GNU General Public License v3.0
412 stars 42 forks source link

Invalid number of options when no icon is set #59

Closed Grelo4ka closed 5 months ago

Grelo4ka commented 5 months ago

Issue Details

zsh-auto-notify results with Invalid number of options. error when no icon is set. The problematic line is: notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" "$icon_arg" Removing $icon_arg fixes the issue.

Operating System (uname -a)

Linux hostname 6.8.7-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 19 Apr 2024 09:51:31 +0000 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.9 (x86_64-pc-linux-gnu)

auto-notify version (echo "$AUTO_NOTIFY_VERSION")

0.10.0

How is auto-notify installed?

Steps to reproduce the issue

  1. Install zsh
  2. Install zsh4humans
  3. Install zsh-auto-notify
  4. Don't set the icon
  5. sleep 11

    gist link to your zshrc

    https://gist.githubusercontent.com/Grelo4ka/d6792dc219b1e285fba49f09a94bff54/raw/2517750c08fc720df06e2c5807c4e44e69eb2bd7/gistfile1.txt

Sujiuzii commented 5 months ago

change the line of notify-send to notify-send "$title" "$body" --app-name=zsh $transient --urgency=$urgency --expire-time=$AUTO_NOTIFY_EXPIRE_TIME $icon_arg working for me.

Sujiuzii commented 5 months ago

change the line of notify-send to notify-send "$title" "$body" --app-name=zsh $transient --urgency=$urgency --expire-time=$AUTO_NOTIFY_EXPIRE_TIME $icon_arg working for me.

I removed the quotation mark of the options

MichaelAquilina commented 5 months ago

Sorry for that, would you be able to check if the latest changes (version 0.10.1) fix your issues?

Sujiuzii commented 5 months ago

Sorry for that, would you be able to check if the latest changes (version 0.10.1) fix your issues?

yes, that works

Grelo4ka commented 5 months ago

Sorry for that, would you be able to check if the latest changes (version 0.10.1) fix your issues?

can confirm it works, thanks!