Closed botanicus closed 5 years ago
yes tmux-gitbar
only works with bash. When I developed it tmux didn't implement action hooks so I had to rely on $PROMPT_COMMAND
to update Git status. (it was tmux 1.9).
FYI I'm currently adding the last touches to the replacement for tmux-gitbar
, it relies solely on tmux hooks. The big advantage is that it is shell-independent as it's called by a hook, so tmux status bar is immediately updated when switching panes or windows. That is not the case with tmux-gitbar
, you need to run something (or nothing but still press ENTER) to trigger the $PROMPT_COMMAND
and updates tmux status bar.
I'm still polishing the project, in the meanwhile if you're interested, check it out at https://github.com/arl/gitstatus, it'w written in go:
gitstatus
, with go go get github.com/arl/gitstatus/cmd/gitstatus
set -g status-right '#(gitstatus -q -fmt tmux #{pane_current_path})'
Enjoy...
@arl you rock! Cheers, I’ll check it out soon.
Hi, there's a typo in the compile command, it should be
- go get github.com/arl/gitstatus/cmd/gistatus
+ go get github.com/arl/gitstatus/cmd/gitstatus
It took me 10 minutes find out why the command was failing. :-)
Jaime
Oups sorry!! thanks for reporting. Updated. Anyway the repository for that tool of mine needs a bit of polishing and documentation
Reopening for reference
FYI the repo linked in issue #60 github.com/arl/gitstatus, will now remain what it was always supposed to be: a library to obtain git status.
I created a new repo github.com/arl/gitmux which is the real replacement for tmux-gitbar.
Tmux-gitbar is a pain in the butt to maintain, written in bash, only supports bash, and was designed at a time when tmux didn't have hooks.
gitmux on the other hand, is much simpler to maintain, to install, more powerful, comes with pre-built binaries and works everywhere where tmux works.
Come and have a look
My shell is ZSH and when I add tmux-gitbar to my configuration, it does nothing (and I’m in a Git repo, both my ZSH and my Tmux (
attach -c
)).I thought I’m doing something wrong, but then I found it relies on the
$PROMPT_COMMAND
which is a Bash thing.