Closed zstreeter closed 4 years ago
Can you post here your .tmux.conf
and the result of tmux -V
please?
I'm also having an issue with this plugin in zsh on Linux Mint 19.2. I followed the troubleshooting steps by extending the status-right-length
to 100 and commented out my entire status-right
. I'm using TPM to install the plugin and then set my path as follows:
TMUX_GITBAR_DIR="$HOME/.tmux/plugins/tmux-gitbar"
source-file "$HOME/.tmux/plugins/tmux-gitbar/tmux-gitbar.tmux"
I confirmed TMUX_GITBAR_DIR
is set in shell and I also ran echo $PROMPT_COMMAND
:
» echo $PROMPT_COMMAND
$HOME/.tmux/plugins/tmux-gitbar/update-gitbar;
When I run the script manually, the status bar shows up properly on execution however any changes (go to another directory or git changes) does not update the status.
tmux
version is 2.9
edit: So the issue is zsh
but none of the troubleshooting items regarding PROMPT_COMMAND
are showing for me. When I used bash
, your plugin is working as expected. Anything else I can check to see what the issue may be in zsh
? I even commented out my entire .zshrc
and still have the same issue
So in doing some searching around zsh
and PROMPT_COMMAND
, it seems zsh
does not evaluate PROMPT_COMMAND
. The workaround is adding this to .zshrc
precmd() {
eval "$PROMPT_COMMAND"
}
source: https://superuser.com/questions/735660/whats-the-zsh-equivalent-of-bashs-prompt-command
tmux-gitbar doesn't support zsh.
Have a look at https://github.com/arl/tmux-gitbar/issues/60 for a solution that is not based off special features of a specific shell, so it works on zsh, all on tmux > v2.2
On Sun, 27 Oct 2019, 21:43 Byron Kim, notifications@github.com wrote:
So in doing some searching around zsh and PROMPT_COMMAND, it seems zsh does not evaluate PROMPT_COMMAND. The workaround is adding this to .zshrc
precmd() { eval "$PROMPT_COMMAND" }
source: https://superuser.com/questions/735660/whats-the-zsh-equivalent-of-bashs-prompt-command
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/63?email_source=notifications&email_token=AADUL2UHJ2T3GEQ77VUZL5DQQX4OVA5CNFSM4I4EDRTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECLHTAA#issuecomment-546732416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUL2WGQJTRYK2YSACNMPTQQX4OVANCNFSM4I4EDRTA .
Totally missed that! You should totally add a comment on top of the README as gitbar
is the first result to pop up in my search. Thanks!
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
Yep - I posted on the gitstatus
repo on configuring colors and you pointed me to gitmux
. Transition was seamless and basically just had to rename the reference in tmux.conf
. Works great! Thank you!
Glad to hear that. Cheers!
I have the go version of gitstatus and I added the .tmux.conf line you suggested in a previous issue. Though, the tmux status bar isn't updated with git info once I go into a git directory. I still have to manually issue the command. Is there something I am missing with the setup?
Thanks!