Skip to content

shuber/tmux-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sean Huber tmux-git

Display git information in your tmux status line

Installation

Install tmux plugin manager and add the following to the end of your .tmux.conf

set -g @plugin "shuber/tmux-git"

Interpolation variables

  • #{git_branch} - display the currently checked out git branch
  • #{git_sha} - display the sha of the latest commit
  • #{git_shortsha} - display the short sha of the latest commit
  • #{git_subject} - display the last commit subject (short message)
  • [TODO] #{git_additions} - display number of uncommitted additions
  • [TODO] #{git_ahead} - display number of commits ahead of master
  • [TODO] #{git_behind} - display number of commits behind master
  • [TODO] #{git_deletions} - display number of uncommitted deletions
  • [TODO] #{git_dirty} - display number of uncommitted dirty files if any

Usage

Add git interpolation variables to your status-left or status-right options in .tmux.conf

set -g status-left "#{git_dirty}"
set -g status-right "#{git_ahead}/#{git_behind} | #{git_branch}"

Adjust the status-interval refresh rate if necessary

set -g status-interval 15 # refresh status line every 15 seconds

Or manually refresh the status line instead

tmux refresh-client -S

Contributing

  • Fork the project.
  • Make your feature addition or bug fix.
  • Send me a pull request. Bonus points for topic branches.

License

MIT - Copyright © 2015 Sean Huber

About

Display git information in your tmux status line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages