-
Notifications
You must be signed in to change notification settings - Fork 102
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
How to integrate posh-git-sh into oh-my-zsh? #14
Comments
Remove printf format string parameter for status string creation. See #14.
The file git-prompt.sh is simply a shell script, so you can source it as usual in
I examined the git prompt plugin for I refactored a little bit, so in your . posh-git-sh/git-prompt.sh
RPROMPT='$(__posh_git_echo)' EDIT: Added quotes around |
@lyze
close and reopen my terminal, then go to my project folder which contains code change, I still can't get the posh-git prompt style. |
This works for me for oh-my-zsh: export ZSH=export/of/.osh-my-sh
ZSH_THEME='crcandy'
plugins=
export PATH=export/of/PATH
source $ZSH/oh-my-zsh.sh
. ~/posh-git-sh/git-prompt.sh
RPROMPT='$(__posh_git_echo)' I think the single quotes are necessary so that the |
@lyze
The above is the my terminal, you can see that the original git-prompt, [staging *], still exist. but I want the posh-git prompt to replace the position. I am not sure if it is by design of posh-git-sh, and it can't be approached. |
By design, posh-git-sh gives you a status line The line
is from crcandy
The theme calls Initial thoughts: You would have to either manually patch every theme you'd like to use to use posh-git instead, or monkey patch |
I resolved the issue by replacing |
Tried for ages and having similar problems trying to integrate with any Prezto theme. The themes don't put VCS info into If I try and store So this script only seems to work when used with the |
Outside the function that deals with setting Maybe this is common problem that people with more zsh experience run into so hopefully someone can point me in the right direction. |
This was way more difficult than I expected. I ended up creating a custom theme:
It would be nice if this community and/or the zsh community could automate this. |
I did the following:
git_prompt_info () {
__posh_git_echo
} That solved it for me, and hopefully should work with all themes that use the built-in |
I want to use posh-git-sh in shell 'oh-my-zsh', but I failed. could you please give me some help?
I posted a thread in stackoverflow
The text was updated successfully, but these errors were encountered: