Created
March 27, 2018 01:56
-
-
Save kentarosasaki/56b9880288dd73b94591e7c26b3e439a to your computer and use it in GitHub Desktop.
tmux で ssh した時に新規ウィンドウで起動してウィンドウをホスト名に変更する方法 ref: https://qiita.com/kentarosasaki/items/44611f1a10594de2fa1f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ chmod +x s.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./s.sh target-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tmux new-window -n $1 | |
tmux send-keys -t:$1 "ssh $1" C-m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment