-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add miniconda ENV support #35
base: master
Are you sure you want to change the base?
Conversation
- Add miniconda `CONDA_DEFAULT_ENV` support, if this variable exists, it'll override `VIRTUAL_ENV` to let the venv work - If venv name is `base` (default name for miniconda) the venv part will be hidden
@@ -456,7 +456,11 @@ typeset -gA jovial_affix_lengths=() | |||
} | |||
|
|||
@jov.set-venv-info() { | |||
if [[ -z ${VIRTUAL_ENV} ]]; then | |||
if [ ! -z $CONDA_DEFAULT_ENV ]; then |
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.
Maybe we could move checking 'base'
name related to CONDA_DEFAULT_ENV
.
Those modifies separates the checks for the CONDA_DEFAULT_ENV
variable and its value being 'base'
,
but that's unnecessary for hidden with virtualenv
lib.
if [[ -n ${CONDA_DEFAULT_ENV} && ${CONDA_DEFAULT_ENV} != "base" ]]; then
@@ -456,7 +456,11 @@ typeset -gA jovial_affix_lengths=() | |||
} | |||
|
|||
@jov.set-venv-info() { | |||
if [[ -z ${VIRTUAL_ENV} ]]; then | |||
if [ ! -z $CONDA_DEFAULT_ENV ]; then | |||
export VIRTUAL_ENV=$CONDA_DEFAULT_ENV |
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.
Setting export VIRTUAL_ENV=$CONDA_DEFAULT_ENV
seems like a bad idea because the two variables do not sync with each other. When deactivating with Conda, the VIRTUAL_ENV
variable is not reset.
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.
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.
II think the (base) env shoud be placed in the right of the arrow
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.
correct
CONDA_DEFAULT_ENV
support, if this variable exists, it'll overrideVIRTUAL_ENV
to let the venv workbase
(default name for miniconda) the venv part will be hidden