LoginSignup
2
2

More than 5 years have passed since last update.

tmuxでSSH時に変更したwindow-nameを自動でもとに戻す(vagrant ssh編)

Posted at

こちらの記事参考にしていたのですが、なぜかwindow名が元に戻らないなと思っていたところ、vagrant sshで接続すると、この関数が使われないためwindow名が元に戻らないことに気づきました。

.zshrc
function vssh() {
    local window_name=$(tmux display -p '#{window_name}')
    command vagrant ssh $@
    tmux rename-window $window_name

vagrant sshするときは、vsshすることにしました。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2