Closed edenbynever closed 3 months ago
I was wondering why I kept getting this error in my terminal! I actually went through resetting my computers thinking I accidentally messed up something with my NixOS config only to just learn that it was this particular issue 👀
Sorry for that, would you be able to check if the latest changes (version 0.10.1) fix your issues?
@MichaelAquilina Can confirm it's fixed!
As currently implemented, the otherwise welcome introduction of support for icons has caused #45 to resurface.
https://github.com/MichaelAquilina/zsh-auto-notify/blob/452eee9454289c8a0a7269eeb1870c842685703d/auto-notify.plugin.zsh#L67
Because
$icon_arg
is quoted, it gets sent unconditionally and, in the case of it being the empty string, will be treated bynotify-send
as a third (and thus invalid) positional argument. Regrettably, the previous fix of simply removing the quotes would fail to account for space-containing icon names/paths.I suspect we could get away with just passing
"--icon=$icon"
, but I've only confirmed that suspicion against Dunst on X11 and mako on Wayland. The more robust solution probably involves adding another conditional and duplicating the command.As an aside, this regression wasn't caught by the tests because
zunit
is perfectly happy with the following:In fact, the assertion even holds with just
run notify-send
, whereasrun false
does cause it to fail, but I'm afraid I wasn't able to make much headway on that particular mystery.