Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create new window and set name

Tags:

tmux

Currently I'll often do prefix-cprefix-, to open a new window then rename it. I would like to make prefix-c automatically ask for a name for the new window.

Basically I want it to behave as if I'd entered prefix-:new-window -n.How do I map prefix-c to that command?

I've tried adding bind-key c 'new-window -n' to my ~/.tmux.conf but that doesn't work.

like image 576
Brett Y Avatar asked Aug 24 '14 23:08

Brett Y


People also ask

How do you name a window in HTML?

The Window name property is used for setting or returning the name of a window. It is generally used to modify the name of a window which has been created in the past. It returns a string which represents the name of the window. Return Value: It returns a string value that represents window name.

What is name window?

The name of the window is used primarily for setting targets for hyperlinks and forms. Browsing contexts do not need to have names.


1 Answers

You'll need a prompt to ask for the new window name:

bind-key c command-prompt -p "window name:" "new-window; rename-window '%%'"
like image 88
jasonwryan Avatar answered Oct 06 '22 10:10

jasonwryan