Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using tmux and terminal-notifier causes failure #140

Closed
oschrenk opened this issue Oct 15, 2023 · 1 comment
Closed

Using tmux and terminal-notifier causes failure #140

oschrenk opened this issue Oct 15, 2023 · 1 comment
Labels

Comments

@oschrenk
Copy link

https://github.com/julienXX/terminal-notifier does not like it when message start with open brackets.

terminal-notifier -message '[]'
...
Note that in some circumstances the first character of a message has to be escaped in order to be recognized.
An example of this is when using an open bracket, which has to be escaped like so: ‘\[’.

Combine that with being in tmux

if test -n "$TMUX_PANE"
    set message (tmux lsw  -F"$__done_tmux_pane_format" -f '#{==:#{pane_id},'$TMUX_PANE'}')" $message"
end

with

    set -q __done_tmux_pane_format; or set -g __done_tmux_pane_format '[#{window_index}]'

is kicking in,

so that every message is prepended by the current tmux pane in brackets.

Resulting in every done execution failing when using default config:

@franciscolourenco
Copy link
Owner

@oschrenk thank you for reporting this. It seems terminal-notifier is a bit unpredictable when it comes to this issue and to which characters need to be escaped. I found that piping the message instead of using the option fixes this issue. Fixed in https://github.com/franciscolourenco/done/releases/tag/1.17.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants