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

[BUG] typer doesn't respect ZDOTDIR env var when adding autocompletion for zsh #171

Open
m-rey opened this issue Oct 1, 2020 · 1 comment · May be fixed by #870
Open

[BUG] typer doesn't respect ZDOTDIR env var when adding autocompletion for zsh #171

m-rey opened this issue Oct 1, 2020 · 1 comment · May be fixed by #870
Labels
bug Something isn't working shell / zsh

Comments

@m-rey
Copy link

m-rey commented Oct 1, 2020

Describe the bug

When autocompletion is created in typer, the necessary changes are made in $HOME/.zshrc:

zshrc_path = Path.home() / ".zshrc"

However, the path to the directory where the .zshrc file is in, can be set by the environment variable ZDOTDIR. Therefore, typer should check first if the environment variable ZDOTDIR is set and valid and use it to find .zshrc and add the necessary line for auto-completion. If it is invalid or simply not set, the default path to $HOME/.zshrc can be used.

To Reproduce

zsh
mkdir "$HOME/not_default_zsh_dir"
touch "$HOME/not_default_zsh_dir/.zshrc"
export ZDOTDIR="$HOME/not_default_zsh_dir"
# try using the typer autocompletion now, it should fail

Expected behavior

typer should check for the ZDOTDIR env var and use it as base to locate .zshrc instead of always using HOME.

@m-rey m-rey added the bug Something isn't working label Oct 1, 2020
@mjmare
Copy link

mjmare commented Aug 15, 2021

Bug still present in Typer 0.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shell / zsh
3 participants