Auto-update tmux status bar with active pane pwd

前端 未结 3 1013
鱼传尺愫
鱼传尺愫 2021-01-02 18:42

In tmux, the status bar normally shows the current working directory of a pane in the window list. If I have for example two panes in a window, and the two panes have differ

3条回答
  •  情歌与酒
    2021-01-02 18:48

    In addition to the previous answer, I'd like to add you don't have to rely on the status-interval option. Waiting to see the change isn't really elegant. You can manually update the status bar on events with:

    tmux refresh-client -S
    

    I use this option after pane/window/session switching. In my tmux config you will find for instance to switch panes:

    bind -r k select-pane -U\; refresh-client -S
    bind -r j select-pane -D\; refresh-client -S
    bind -r l select-pane -R\; refresh-client -S
    bind -r h select-pane -L\; refresh-client -S
    

    I have previously posted on this: manually refresh status bar

提交回复
热议问题