Closed MarsLyukova closed 4 months ago
Where are you calling source ./<internal_setup_script>.sh
? Is it in your zshrc file, or are you calling it manually in your shell?
I am calling it manually in the shell.
Seems like your shell script is resetting your PATH for some reason. Try adding an echo $PATH
before the problematic line to see if ~/.local/bin
has been removed.
Hi @ajeetdsouza , I added echo $PATH
and it is indeed the case that ~/.local/bin
is removed from PATH.
I cannot change these scripts, so I am OK with closing the issue if one of the requirements of using zoxide is that PATH
must always keep ~/.local/bin
.
Edit: Also as a correction, I did use --cmd cd
when testing. I removed it after obtaining these errors.
You could try moving the zoxide binary to a directory that is contained in $PATH
. For example, if you have /usr/local/bin
available in your PATH:
sudo mv ~/.local/bin/zoxide /usr/local/bin/
Hello, I have a problem using zoxide while setting up an enviroment via a script.
Setup
This is my ~/.zshrc
This is my ~/.bashrc
With this, I am able to use the
z
command as expected in both bash and zsh shells. I have not setup--cmd
.The issue:
I have a development enviroment setup by a script. In zsh I obtain the below output
Using bash, the
__zoxide_hook:2: command not found: zoxide
line is not present. From debugging, I found the problematic line to bex=$(\cd "$x";\pwd)
Removing
eval "$(zoxide init zsh)"
also removes the errors, but of course I can't usez
. Is there any idea why I am obtaining this__zoxide_hook:2
error?