How to use posh-git-bash in oh-my-zsh?
<p>I can use the posh-git-bash in normal bash shell, but I can't use it under oh-my-zsh. </p>

<p>First of all, I follow github project <a href="https://github.com/lyze/posh-git-sh" rel="nofollow">posh-git-sh</a> to create ~/git-prompt.sh, and add the following scripts to the bottom of file ~/.bashrc </p>

<pre><code>source ~/git-prompt.sh
PROMPT_COMMAND='__posh_git_ps1 "\u@\h:\w" "\\\$ ";'$PROMPT_COMMAND
</code></pre>

<p>reopen the terminal, and go to a git project folder, all the git prompts are correct and as I expected. e.g. </p>

<pre><code>Orion@Orions-machine-1:~/Source/MyProjects/deploy_tools [master ≡ +0 ~1 -0 | +1 ~0 -0]$
</code></pre>

<p>Then, I follow the github project <a href="https://github.com/robbyrussell/oh-my-zsh" rel="nofollow">oh-my-zsh</a> to install zsh and oh-my-zsh. I choose the 'crcandy' theme, and add the scripts to the bottom of file ~/.zshrc.</p>

<p>But it always uses the format defined in theme 'crcandy', just show a '*' in prompt. </p>

<pre><code>Orion@Orions-machine-1 [10:25:57] [~/Source/MyProjects/deploy_tools] [master *]
</code></pre>

<p>The file ~/.oh-my-zsh/themes/crcandy.zsh-theme content:</p>

<pre><code>PROMPT=$'
%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}-&gt;%{$fg_bold[blue]%} %#%{$reset_color%} '

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
</code></pre>

<p>Anybody could give me help, and make them work together? </p>