writeShellApplication causes tmux windows named 'bash'

I made an overlay for the neovim package that uses writeShellApplication. I followed this tutorial, and my overlay is working as expected.

When I launch nvim, tmux changes the window name to bash. I expect this because writeShellApplication starts a bash shell with a special PATH where neovim is launched (I think?) But in general I would like tmux to pick up on which executable I started and display its name as the window name.

Is there a way around this or an alternative trivial builder that would help?

Does replacing nvim with exec nvim in the script solve this?, So according to the tutorial you linked:

exec ${myNeovimUnwrapped}/bin/nvim "$@"
3 Likes

Exactly what I was missing thanks.