Skip to content

Display pyhton version and virtualenv(i.e. pyenv) name in zsh prompt.

License

Notifications You must be signed in to change notification settings

yonchu/zsh-python-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zsh-python-prompt

Display pyhton version and virtualenv name in zsh prompt.

ScreenShot01

Sample

Python: /usr/bin/python

[user@host([email protected])]$

Python: /usr/local/bin/python

[user@host([email protected])]$

Python: Use pyenv (/usr/local/bin/python)

[user@host(⌘[email protected])]$ pyenv version
system (set by /Users/user/.pyenv/version)

Python: Use pyenv (/Users/user/.pyenv/versions/2.7.8/bin/python2.7)

[user@host(⌘@2.7.8)]$ pyenv version
2.7.8 (set by /Users/user/.pyenv/version)

Python: Use pyenv (/Users/user/.pyenv/versions/pyenv_t/bin/python)

[user@host(⌘[email protected])]$ pyenv version
pyenv_test (set by /Users/user/hoge/fuga/pyenv_test/.python-version)

Installation

1.Source zsh-python-prompt/zshrc.zsh file.

source /path/to/zsh-python-prompt/zshrc.zsh

2.Set the environmental variable $ZSH_PYTHON_PROMPT to PROMPT or RPROMPT.

PROMPT+='$ZSH_PYTHON_PROMPT'

3.Enable environmental variables in PROMPT.

setopt prompt_subst

Customize

Change pyenv symbol.

zstyle ':zsh-python-prompt:pyenv:' symbol ''

License

MIT License

About

Display pyhton version and virtualenv(i.e. pyenv) name in zsh prompt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages