franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
766 stars 70 forks source link

fix: dont print errors to stdout when no window id found #147

Open ammgws opened 1 month ago

ammgws commented 1 month ago

Sometimes when running a command this error is spewed onto the console:

jq: error: syntax error, unexpected ')' (Unix shell quoting issues?) at <top-level>, line 1:
.. | objects | select(.id == ) | .visible
jq: 1 compile error

This reproduces every time for me: fisher update; and fish_update_completions (this is actually the only time it happens for me)

This is because $__done_initial_window_id is empty '' and thus causing the jq filter to fail.

Regardless of whether window ID can be empty or not, the jq command stderr should be suppressed as all we care about is the exit status.