Skip to content

Conversation

Rikiub
Copy link

@Rikiub Rikiub commented Sep 22, 2025

Auto-load files support was added on Nushell v0.96.0, allowing nu files to be auto-loaded on shell start. This behavior is documented here.

This PR replaces the need of have a separate file and source it "manually". Instead, Zoxide completions now can be added with one-line command.

Also, Zoxide now requires v0.96.0+ as minimum Nushell version.

@ajeetdsouza
Copy link
Owner

Unfortunately, this wouldn't work.

The reason zoxide requires you to add zoxide init nushell | save -f ~/.zoxide.nu to your Nushell env file is so that the init script is regenerated every time you start a new shell. The advantage of this approach is that every time you update zoxide, the init script gets updated.

Given how often Nushell introduces breaking changes, it is important to make this process smooth. The only other option would be to expect the user to remember to re-run the init script every time they update zoxide, which would be bad UX.

@Rikiub
Copy link
Author

Rikiub commented Sep 22, 2025

Thanks for the advice, I made some changes.

Now requires write the command inside config.nu, so each time the shell is started, the file autoload/zoxide.nu is created.

I think should be enough @ajeetdsouza

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.

2 participants