0

I can do it in two commands:

new-session - creates new session.

move-window -t {session-name}: - moves current window to session 1.

I'd like to bind those to a key, but I haven't found a way to make them work automatically. There's no variable #{last-created-session}.

Is there a way to automate this?

0

Do it with the shell and run-shell, something like:

bind m run "S=$(tmux new -dP); tmux movew -t$S"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.