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

zoxide: update mkOrder to place bash configuration at end of bashrc #6572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carschandler
Copy link

@carschandler carschandler commented Mar 4, 2025

I updated my flake a few weeks back and zoxide has been giving me an error recently:

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.

To be fair, I haven't noticed any issues with zoxide apart from this error message.

The zoxide eval statement in my .bashrc is not "right at the end" of the file as mentioned in the message which isn't surprising given that it is given a mkOrder 150. In my own config, I increased this to 2000 (to ensure it comes after any mkAfters which are mkOrder 1500) to ensure it happens at the end of the script. After doing so, it appears at the end of my bashrc and I no longer get the error message.

I'm open to suggestions on the exact value to use as 2000 may be overkill and I'm unaware of other programs which may need to be evaluated last with more urgency than zoxide.

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@marsam

I updated my flake a few weeks back and `zoxide` has been giving me an error recently:

```
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.
```

To be fair, I haven't noticed any issues with `zoxide` apart from this error message.

The `zoxide` eval statement in my `.bashrc` is not "right at the end" of the file as mentioned in the message which isn't surprising given that it is given a `mkOrder 150`. In my own config, I increased this to `2000` (to ensure it comes after any `mkAfter`s which are `mkOrder 1500` to ensure it happens at the end of the script. After doing so, it appears at the end of my `bashrc` and I no longer get the error message.

I'm open to suggestions on the exact value to use as `2000` may be overkill and I'm unaware of other programs which may need to be evaluated last with more urgency than `zoxide`.
@carschandler carschandler changed the title Update zoxide.nix to place bash configuration at end of bashrc zoxide: update mkOrder to place bash configuration at end of bashrc Mar 4, 2025
carschandler added a commit to carschandler/nixos that referenced this pull request Mar 5, 2025
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

Successfully merging this pull request may close these issues.

1 participant