arialdomartini / oh-my-git

An opinionated git prompt for bash and zsh
MIT License
3.65k stars 287 forks source link

How to use old prompt ?! #63

Open syrm opened 9 years ago

syrm commented 9 years ago

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

arialdomartini commented 9 years ago

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?

syrm commented 9 years ago

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

robkorv commented 8 years ago

@arialdomartini can you please share how I can do this?

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.

WinstonN commented 8 years ago

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 <sorin.ionescu@gmail.com>
#

# 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 "
stephanfriedrich commented 6 years ago

@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