Tmux: How to configure tmux to display the current working directory of a pane on the status bar?

后端 未结 3 2075
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 03:14

I am new to tmux and I am trying to edit my tmux.conf file to have the left side of the status bar reflect:

[SessionName] [CurrentPane] [CurrentWorkingDirectory]

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 03:21

    There is a variable for that, which doesn't seem to be in the manpage but is mentioned in the development version. For me, it works in the 1.8 release of tmux.

    set -g status-left "#{pane_current_path}"
    

    Note that it also works when you put it in the window-status. Each window status will mention respective working directories.

    setw -g window-status-format "#{pane_current_path}".
    

提交回复
热议问题