Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 829 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 829 Bytes

iTerm-pyenv

Shows the current python environment name in iTerm's status bar, saving precious space in the shell prompt area.

image

Installation

  1. Copy pyenv.py to the iTerm Scripts directory.
mkdir -p ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
cp pyenv.py ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
  1. Add the following lines to fish_prompt
nano ~/.config/fish/functions/fish_prompt.fish
function fish_prompt
    # set python env for iTerm
    set py (pyenv version-name)
    if set -q VIRTUAL_ENV
        set py (basename $VIRTUAL_ENV)
    end
    iterm2_set_user_var py $py
    ##

		....    
end