franciscolourenco / done

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

Fix errors when done is run inside tmux #124

Closed ovikk13 closed 7 months ago

ovikk13 commented 2 years ago

If tmux is started with a start directory (e.g. /usr/bin/tmux new-session -c /some/start/dir), then basename in __done_is_tmux_window_active will fail to extract tmux and thus fail to identify the process as tmux.

Tmux also starts fish as a login shell, leading to the process name being '-fish'. When passing this to basename, it interpets the hyphen as an option being passed to basename.