arl / tmux-gitbar

Git in your tmux status bar
GNU General Public License v3.0
169 stars 16 forks source link

Does not work in zsh #59

Closed lbergnehr closed 6 years ago

lbergnehr commented 6 years ago

Great tmux/git addition!

However, right now it doesn't seem to work in zsh for me. When I enter bash and then a git repo I get the nice status bar, but when I'm just i zsh, it doesn't seem to work.

lbergnehr commented 6 years ago

Found this: https://superuser.com/questions/735660/whats-the-zsh-equivalent-of-bashs-prompt-command#822195

Looks quite easy to make this work by using zsh's precmd() function.

arl commented 6 years ago

Hey @lbergnehr thanks a lot but currently tmux-gitbar only supports bash shell. I say currently because I recently found that starting from tmux v2.3, command hooks are supported. This will basically decouples tmux-gitbar from any specific shell. We'll be able to directly define a command to run after the user has switched pane/window, in tmux configuration. I'm already working on a full rewrite of tmux-gitbar using that feature. Stay tuned

lbergnehr commented 6 years ago

Awesome news! Keep up the good work!

SimonLammer commented 6 years ago

Are there any updates to this? I'm a zsh user myself and am looking into moving my git status from the zsh status (the text before the prompt) to the tmux status, because the zsh status doesn't update (which makes sense).

arl commented 6 years ago

Hi, an issue had been created about that some weeks ago. Check it out if you want a temporary workaround (in fact it's better than a workaround) it is actually the rewrite of tmux-gitbar, but for now it doesn't have documentation. https://github.com/arl/tmux-gitbar/issues/60