Skip to content

Instantly share code, notes, and snippets.

@sjvrijn
Last active May 20, 2024 23:03
Show Gist options
  • Save sjvrijn/2c2d57d517bee95377c1f91b7538db3f to your computer and use it in GitHub Desktop.
Save sjvrijn/2c2d57d517bee95377c1f91b7538db3f to your computer and use it in GitHub Desktop.
pyenv display oh-my-zsh
# User configuration
export PATH="$HOME/.pyenv/bin/:$HOME/.pyenv/shims/:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
# Theme customisation
prompt_virtualenv() { # show pyenv version-name if not using 'system'
local version="$(pyenv version-name)"
if [[ $version != "system" ]]; then
prompt_segment cyan '' "🐍 ${version}"
fi
}
prompt_context() {
prompt_segment black '' '%m' # only show machine
}
prompt_dir() { # only show current directory, not whole path
prompt_segment blue $CURRENT_FG '%c'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment