Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

themes/sirup: Show VirtualEnv #335

Merged
merged 4 commits into from
Feb 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion themes/sirup/sirup.theme.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#! bash oh-my-bash.module
# For unstaged(*) and staged(+) values next to branch name in __git_ps1
GIT_PS1_SHOWDIRTYSTATE="enabled"
OMB_PROMPT_VIRTUALENV_FORMAT=' [%s]'
OMB_PROMPT_CONDAENV_FORMAT=' [%s]'
OMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}

function _omb_theme_sirup_rubygem {
local gemset=$(command awk -F'@' '{print $2}' <<< "$GEM_HOME")
Expand All @@ -15,7 +18,9 @@ function _omb_theme_sirup_rubygem {

function _omb_theme_PROMPT_COMMAND {
# Check http://github.com/Sirupsen/dotfiles for screenshot
PS1="$_omb_prompt_navy\W/$_omb_prompt_bold_navy$(_omb_theme_sirup_rubygem)$_omb_prompt_bold_green$(__git_ps1 " (%s)") ${_omb_prompt_normal}$ "
local python_venv
_omb_prompt_get_python_venv
PS1="$_omb_prompt_navy\W/$_omb_prompt_bold_navy$(_omb_theme_sirup_rubygem)$_omb_prompt_bold_purple$python_venv$_omb_prompt_bold_green$(__git_ps1 " (%s)") ${_omb_prompt_normal}$ "
}

_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND