mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
PROMPT var updated to display venv base name (py)
To display the active python virtualenv base name inside the 'prompt', added a script and injected it in the PROMPT variable.
This commit is contained in:
parent
3477ff2527
commit
22a7c9a281
1 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`')'
|
||||
}
|
||||
|
||||
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
|
||||
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
|
||||
PROMPT='${ret_status}%{$fg[cyan]%}$(virtualenv_info) %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue