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

Options settings ingnored #7

Open
FranzFelberer opened this issue Apr 14, 2020 · 1 comment
Open

Options settings ingnored #7

FranzFelberer opened this issue Apr 14, 2020 · 1 comment

Comments

@FranzFelberer
Copy link

It seems that changing the options settings is ignored.

From my .zshrc

...
export ZSH_POETRY_AUTO_DEACTIVATE=0
export ZSH_POETRY_AUTO_ACTIVATE=0

# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Some plugins have to have a certain order (historu-substring-search after zsh-syntax-highlighting)

plugins=(
  autoupdate
  git
  pyenv
  poetry
  vi-mode
  zsh-autosuggestions
  zsh-completions
  zsh-nvm
  zsh-poetry
  zsh-syntax-highlighting
  history-substring-search
)
...

The venv gets still automatically activated and deactivate.

@jpweytjens
Copy link

I think this is the case because the code uses the -n flag in the if statements, which checks if the length of the string is non zero. This is the case for both ZSH_POETRY_AUTO_ACTIVATE=1 and ZSH_POETRY_AUTO_ACTIVATE=0. The expected behaviour is when these if statements are replaced with [[ $ZSH_POETRY_AUTO_DEACTIVATE -eq 1]] and equivalent for the ZSH_POETRY_AUTO_ACTIVATE .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants