Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh vcs_info recipe #269

Open
danielshahaf opened this issue Dec 2, 2019 · 0 comments
Open

zsh vcs_info recipe #269

danielshahaf opened this issue Dec 2, 2019 · 0 comments

Comments

@danielshahaf
Copy link
Contributor

I use vcsh in conjunction with zsh and vcs_info and I'd like to share the following recipe:

zstyle -e ':vcs_info:git+post-backend:*' hooks 'reply=( ${${(k)functions[(I)[+]vi-git-post-backend*]}#+vi-} )'
+vi-git-post-backend-vcsh() {
  if git config --get 'vcsh.vcsh' > /dev/null; then
    hook_com[branch]+="%f/vcsh${GIT_DIR:+":${${GIT_DIR:t}%.git}"}" # %f ends coloring
  fi
}

With this recipe, after doing vcsh enter foo, the vcs_info prompt says (git)-[master/vcsh:foo]- rather than (git)-[master]-.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant