There is no global default window name that is applied to all new windows; they default to (part of) the first “word” of the command (or the default shell if there is no command). Your windows are probably defaulting to
reattach-to-user-namespace because you that is the first interesting bit of your
It would be a bit round-about, but you could put your default command in a shell script and point your
default-command to that script instead. With that configuration the default window name (for windows created without an explicit command) would be whatever you named the shell script.
Otherwise, there are several ways to manually name/rename a window:
At creation time with
new-window -n 'some name'
You could re-bind
c (the default key used to create a window) to incorporate a “default name” of your choosing:
bind-key c new-window -n 'default name'
Rename an existing window:
rename-window 'new name'
There is also a default binding (Prefix
,) that will prompt you for a new name and rename the window.
Rename a window via an “escape sequence” sent to a pane’s tty:
# E.g. in a shell:
Your “prompt me for a name for a new window” can be done like this (prompting before or after creating the window):
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
bind-key C new-window \; command-prompt -p "Name for this new window: " "rename-window '%%'"