DEV Community

Thomas Boel Micheelsen
Thomas Boel Micheelsen

Posted on

Can't kill window with * in name (active window) using it's name

Hi there,

Very quick question, and I cannot seem to find anyone else having encountered this issue for some reason.
As a little context I am building a CLI that handles a series of tmux sessions and windows. So everything I do with tmux is handled through their CLI commands.

Lets say we have a tmux session "tmux_session". It has 3 windows "a", "b" and "c".
When attempting to close "c", which might at this point be the active window, it won't be closed with tmux kill-window -t b, because it's name is now "b*".
Or at least this is my assumption.

How can I handle this in my application though? Would I have to get the windows with list-windows -t tmux_session and check if "b" is the "(active)" one?
It just seems weird to me that tmux "renames" the window like this, any way to circumvent this?

Top comments (0)