themes/agnoster: Changes in prompt_virtualenv() function in order to show the python version and not the folder name. (#147)
This commit is contained in:
parent
2a41e70e92
commit
749823b78f
@ -208,13 +208,18 @@ prompt_end() {
|
||||
### virtualenv prompt
|
||||
prompt_virtualenv() {
|
||||
if [[ -n $VIRTUAL_ENV ]]; then
|
||||
# the last word in --version command correspond to version number
|
||||
for e in $($VIRTUAL_ENV/bin/python --version)
|
||||
do
|
||||
VENV_VERSION=$e
|
||||
done
|
||||
|
||||
color=cyan
|
||||
prompt_segment $color $PRIMARY_FG
|
||||
prompt_segment $color white "$(basename $VIRTUAL_ENV)"
|
||||
prompt_segment $color white "$(basename $VENV_VERSION)"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
### Prompt components
|
||||
# Each component will draw itself, and hide itself if no information needs to be shown
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user