oh-my-git
oh-my-git copied to clipboard
How to use old prompt ?!
I don't understand how to use old prompt. My config : antigen theme robbyrussell antigen bundle arialdomartini/oh-my-git antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
And outside git directory my prompt look like this : ${ret_status}$fg_bold[green] $fg[cyan]~ $fg_bold[blue]$(git_prompt_info)$fg_bold[blue] $reset_color
Hi @oxman
could you please try to put your old prompt in the variable omg_ungit_prompt?
I have the suspect that the strange behaviour you are seeing could be the side effect of some other antigen or oh-my-zsh theme. Could you please share your .zshrc with me?
Its ok in omg_ungit_prompt, i already "fixed" my problem with settings this variable one month ago :)
my .zshrc : source /usr/share/zsh/scripts/antigen/antigen.zsh
antigen use oh-my-zsh antigen bundle arialdomartini/oh-my-git antigen bundle autojump antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
antigen apply
@arialdomartini can you please share how I can do this?
- in git dirs use
antigen theme arialdomartini/oh-my-git-themes oppa-lana-style - in non git dirs use
antigen theme robbyrussell
source "$HOME/.antigen/antigen.zsh"
antigen-use oh-my-zsh
antigen bundle git
antigen bundle gulp
antigen bundle npm
antigen theme robbyrussell
antigen-bundle arialdomartini/oh-my-git
antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
antigen-apply
How should is use omg_ungit_prompt? No I get ${ret_status} $fg[cyan]compound$reset_color $(git_prompt_info) like promt outside git dirs.
hello
I would like to use my old zsh theme (pretzo) when I am not in a git directory
I tried to set the variable omg_ungit_prompt in my ~/.zshrc to
omg_ungit_prompt="$(zpretzo)"
but this does not work. Can you please explain to me how to do it?
EDIT: I found how to do this
In ~/.zshrc i added at the bottom
# set normal prompt when not in git
export omg_ungit_prompt="[%T] %{\033[36m%}%~%{\033[0m%} %B%F{1}❯%F{3}❯%F{2}❯%f%b "
My complete file now looks like
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
# Customize to your needs...
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# antigen
source "$HOME/.antigen/antigen.zsh"
antigen-use oh-my-zsh
antigen-bundle arialdomartini/oh-my-git
antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
antigen-apply
# set normal prompt when not in git
export omg_ungit_prompt="[%T] %{\033[36m%}%~%{\033[0m%} %B%F{1}❯%F{3}❯%F{2}❯%f%b "
@arialdomartini Hi i want to use oh-my-git besides of oh-my-zsh. but if i change my working-directory to non git-repo. it wont load the zsh-theme.
what can i do ? thx