mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Added python prompt into zsh
This commit is contained in:
parent
8ca019f02a
commit
06f058a14c
1 changed files with 7 additions and 3 deletions
|
|
@ -5,15 +5,19 @@ function prompt_char {
|
||||||
}
|
}
|
||||||
|
|
||||||
function virtualenv_info {
|
function virtualenv_info {
|
||||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
[ $VIRTUAL_ENV ] && echo `dirname $VIRTUAL_ENV | xargs basename`'#'`basename $VIRTUAL_ENV`
|
||||||
|
}
|
||||||
|
|
||||||
|
function virtualenv_info_prefix {
|
||||||
|
[ $VIRTUAL_ENV ] && echo and
|
||||||
}
|
}
|
||||||
|
|
||||||
function collapse_pwd {
|
function collapse_pwd {
|
||||||
echo $(pwd | sed -e "s,^$HOME,~,")
|
echo $(pwd | sed -e "s,^$HOME,~,")
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
|
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $(virtualenv_info_prefix) %{$reset_color%}%{$fg[red]%}$(virtualenv_info)%{$reset_color%}
|
||||||
$(virtualenv_info)$(prompt_char) '
|
$(prompt_char) '
|
||||||
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue