Skip to content

zoxide: detected a possible configuration issue. #1013

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

Open
FuwaFuwa4242 opened this issue Mar 11, 2025 · 10 comments
Open

zoxide: detected a possible configuration issue. #1013

FuwaFuwa4242 opened this issue Mar 11, 2025 · 10 comments

Comments

@FuwaFuwa4242
Copy link

zoxide: detected a possible configuration issue.
Please ensure that zoxide is initialized right at the end of your shell configuration file (usually ~/.bashrc).

If the issue persists, consider filing an issue at:
https://github.com/ajeetdsouza/zoxide/issues

Disable this message by setting _ZO_DOCTOR=0.

whenever i execute the command z i get this error message but i have intialized it in my .bashrc since the last line is eval "$(zoxide init bash)"

@FuwaFuwa4242
Copy link
Author

fixed

@clydeugene
Copy link

fixed

Hey @FuwaFuwa4242 if you don't mind, please may you share how you fixed it? I am assuming you did so without setting _ZO_DOCTOR=0 correct?

@ajeetdsouza
Copy link
Owner

@clydeugene did you follow the instructions printed on your terminal?

Please ensure that zoxide is initialized right at the end of your shell configuration file.

@FuwaFuwa4242
Copy link
Author

i just swapped from bash to zsh and the bug was fixed, even if i had bash as my default shell it gave me the config error but after swapping to zsh it seemed to be fixed now it remembers my directories properly and functions as expected

@clydeugene
Copy link

@clydeugene did you follow the instructions printed on your terminal?

Yes I did. I am using bash and every time I start a new shell instance I get that message. For what it's worth, I installed zoxide as a local user, as I do not have sudo access on the Ubuntu server that I use.

i just swapped from bash to zsh and the bug was fixed, even if i had bash as my default shell it gave me the config error but after swapping to zsh it seemed to be fixed now it remembers my directories properly and functions as expected

That's interesting. Unfortunately I am stuck with bash as that is what works best for the lab that I am in.

@ajeetdsouza
Copy link
Owner

@clydeugene usually, this issue occurs because something is being initialized after zoxide, and is overriding it. For a lot of users, this happens due to Starship. If zoxide is at the bottom of your config, that shouldn't be happening - could you share your config here?

@clydeugene
Copy link

config_copy.txt

@ValentinGurkov
Copy link

My configuration also has zoxide last on Windows Git Bash and I get the same error.

eval "$(fzf --bash)"
eval "$(starship init bash)"
eval "$(fnm env --use-on-cd)"
eval "$(zoxide init bash --cmd cd)"

@ajeetdsouza
Copy link
Owner

ajeetdsouza commented Apr 1, 2025

@clydeugene @ValentinGurkov could you also paste the output of echo $PROMPT_COMMAND here?

@ajeetdsouza ajeetdsouza reopened this Apr 1, 2025
@ValentinGurkov
Copy link

@clydeugene @ValentinGurkov could you also paste the output of echo $PROMPT_COMMAND here?

This helped, I think I know a bit more about this:

 echo $PROMPT_COMMAND
__vsc_prompt_cmd_original

It seems like VSCode injects its' own things. Disabling the shell integration will result in using the zoxide prompt:

"terminal.integrated.shellIntegration.enabled": false
echo $PROMPT_COMMAND
__zoxide_hook;starship_precmd

I am not sure if there are any other alternatives?

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

4 participants