-
-
Notifications
You must be signed in to change notification settings - Fork 757
(theme/dulcie) Add virtual environment information to dulcie theme #715
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
8e58860
17ec13a
65ce838
6fdf324
4e87850
0733fd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,18 +3,14 @@ | |||||||
| # Simplistic one-liner theme to display source control management info beside | ||||||||
| # the ordinary Linux bash prompt. | ||||||||
| # | ||||||||
| # Demo: | ||||||||
| # | ||||||||
| # [ritola@localhost ~]$ cd .bash-it/themes/dulcie | ||||||||
| # [ritola@localhost |master ✓| dulcie]$ # This is single line mode | ||||||||
| # |bash-it|± master ✓| | ||||||||
| # [ritola@localhost dulcie]$ # In multi line, the SCM info is in the separate line | ||||||||
| # | ||||||||
| # Configuration. Change these by adding them in your .bash_profile | ||||||||
|
|
||||||||
| DULCIE_COLOR=${DULCIE_COLOR:=1} # 0 = monochrome, 1 = colorful | ||||||||
| DULCIE_MULTILINE=${DULCIE_MULTILINE:=1} # 0 = Single line, 1 = SCM in separate line | ||||||||
|
|
||||||||
| # Configuration for Python/Conda virtual environments | ||||||||
| OMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true} # Keep this for consistency | ||||||||
|
||||||||
| OMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true} # Keep this for consistency | |
| OMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false} # Keep this for consistency |
This line is usually put to keep the old behavior for existing users. We haven't been showing the Python environment information in the prompt, so we should keep the default behavior to be not showing it and let the user opt-in the Python environment information by setting OMB_PROMPT_SHOW_PYTHON_VENV in ~/.bashrc explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed! now the default is false.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMB_PROMPT_SHOW_PYTHON_VENV is meant for the prompt segment generated by _omb_prompt_get_python_venv():
oh-my-bash/lib/omb-prompt-base.sh
Lines 522 to 524 in 63ebf65
| function _omb_prompt_get_python_venv { | |
| python_venv= | |
| [[ ${OMB_PROMPT_SHOW_PYTHON_VENV-} == true ]] || return 1 |
Please use _omb_prompt_get_python_venv instead of defining a function doing the same thing as the existing one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed! the customized function was deleted.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. It should not be removed. I added them back
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for pointing it out. I have fixed this code. No extra edits in addition to adding the venv info to the prompt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were they removed? Are there problems with these descriptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to apologize for it. No problem for these descriptions. My initial intention was to make my codes run but ignore the fact that I need to ensure I only made minimal and meaningful changes to the original codebase. I added them back in my new commit.