Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 1.23 KB

README.md

File metadata and controls

72 lines (47 loc) · 1.23 KB

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