ajeetdsouza / zoxide

A smarter cd command. Supports all major shells.
MIT License
22.12k stars 537 forks source link

Update the `zoxide init nushell` script. #699

Closed Oglo12 closed 6 months ago

Oglo12 commented 7 months ago

Nushell has changed some things, so this command doesn't work. It is outdated.

ajeetdsouza commented 7 months ago

Have you tried installing the latest version of zoxide?

curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
disconsis commented 7 months ago

I had a similar issue - nushell complains about def --env not being valid in the init script. However it turns out I just have an older version of nushell (0.84) and just saw that only 0.89+ is supported. Might be a good idea to check the version on startup?

There's problems with that though. Since nushell will parse the script before running it, if running the script with an older nushell version it won't be able to even run it.

disconsis commented 7 months ago

There's hacks around that, but it might (probably?) not be worth it.

ajeetdsouza commented 7 months ago

Your version of zoxide is out of date. This is fixed on v0.9.3.

disconsis commented 7 months ago

I am on 0.9.3

ketan@wsl:/tmp/foo$ zoxide --version
zoxide 0.9.3
ajeetdsouza commented 7 months ago

@disconsis have you updated to the latest version of Nushell as well? Nushell is pre-1.0, every few versions there are breaking changes, so you need to be on the latest versions of both.

github-actions[bot] commented 6 months ago

This issue has been automatically closed due to inactivity. If you feel this is still relevant, please comment here or create a fresh issue.