Update Zoxide shell setup for Nushell in README#1118
Update Zoxide shell setup for Nushell in README#1118Rikiub wants to merge 8 commits intoajeetdsouza:mainfrom
Conversation
|
Unfortunately, this wouldn't work. The reason zoxide requires you to add 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. |
|
Thanks for the advice, I made some changes. Now requires write the command inside I think should be enough @ajeetdsouza |
I get this weird error on the linter tests: README.md:245:81 MD013/line-length Line length [Expected: 80; Actual: 110] Therefore I had to separate the text into two lines.
|
Hey! One more thing that just occurred to me: what happens to users who don't have any autoload directories? |
|
I didn't think on it, but what about tell the users to ensure I could add something like: Then follow the next instructions. Or maybe just add both to config: |
|
Hm, in that case, I'm not sure that this is a better way to initialize zoxide on Nushell. What do you think? Also, to clarify - there could be two problems here:
|
|
I don't think casual users would replace autoload directories, by default nushell always set one autoload directory under My reason to use autoload directories is because is cross-platform. In my opinion, the second way is the most easy for new users: Tell me if you agree so I can send another commit 👋 |
|
Just to add some context to this conversation (as a fellow nushell enthusiast 😀 ), this is how the Starship prompt instruct installation: https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") To me this seems pretty clean :) |
Auto-load files support was added on Nushell v0.96.0, allowing
nufiles 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.