Skip to content

Always be aware of the current python environment in iTerm's status bar

Notifications You must be signed in to change notification settings

scientifichackers/iterm-pyenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

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

About

Always be aware of the current python environment in iTerm's status bar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages