Last active
January 7, 2023 05:48
-
-
Save lomholdt/24997c21c89a491c9bd3447fddb5223d to your computer and use it in GitHub Desktop.
Add git branch to tmux status bar
This file contains hidden or 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
set -g status-right '#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To add something on the right side of the status bar, we
set -g status-right
.#(...)
.#{pane_current_path}
git rev-parse --abbrev-ref HEAD
. You can also do it manually bygit branch | grep \* | sed -e 's/[* ]//'