Switch between sessions in tmux?

后端 未结 5 1374
天涯浪人
天涯浪人 2020-12-25 09:49

I\'m relatively new to tmux and use it just for local development. In some tmux tutorials, a person will list out their tmux sessions in an enumerated list. There is yellow

相关标签:
5条回答
  • 2020-12-25 10:24

    A faster switch by name is for example possible with a shell alias. For the zsh it can look as follows:

    function tn() (
        if [ -n "$1" ]
          then
             tmux switch -t $1
          else
             echo "no session name"
         fi
      )
    

    With tn go you switch to the tmux session with name go.

    0 讨论(0)
  • 2020-12-25 10:34

    Use tmux switch -t [target-session] if want to switch instant

    0 讨论(0)
  • 2020-12-25 10:36

    Is PREFIX s but the real command is choose-tree. Then you can use it to bind to other key for example to 'S'

    bind S choose-tree
    

    http://man.openbsd.org/OpenBSD-current/man1/tmux.1#choose-tree

    0 讨论(0)
  • 2020-12-25 10:38

    CTRL-b s

    found it! Alex's answer is awesome as well. Note CTRL-b is my prefix, your prefix could be something else.

    0 讨论(0)
  • 2020-12-25 10:40

    You're looking for C-b ( and C-b ). You can find this and many more wonderful tips on the tmux cheatsheet.

    0 讨论(0)
提交回复
热议问题