feat(cli): more Nushell support#1305
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
27ed9cc to
259b9e6
Compare
resolves #1144 While comprehensive support for Nushell seems to be under development in #1305, that pull request has a large impact. Therefore, I have limited the scope of this change to env support to align with the existing issue. ```nushell # nushell # 1. Setup vp env setup source ~/.vite-plus/env.nu # or restart Nushell # 2. Set a specific version vp env use 20 # Using Node.js v20.20.2 (resolved from 20) $env.VP_NODE_VERSION # 20.20.2 # 3. Resolve from .node-version vp env use # Using Node.js v22.18.0 (resolved from .node-version) $env.VP_NODE_VERSION # 22.18.0 # 4. Completion (requires Fish) vp <Tab> # add Add packages to dependencies # build Build application # cache Manage the task cache # check Run format, lint, and type checks # ... (all subcommands shown) # 5. False detection regression (bash launched from Nushell) # NU_VERSION is inherited by child processes, but VP_SHELL_NU is not set, # so vp correctly uses POSIX eval mode inside bash. bash -c 'vp env use 20 && echo $VP_NODE_VERSION' ```
|
I think it support by #1312 |
|
This PR has broader scope than the one you mentioned, so I believe it'd be worth enough to keep this active. I'm just not having enough spare time to rebase over 😅 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e2243ba7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@XiNiHa can you fix the conflicts? I'm going to merge this and release it in the next version. |
|
I'll fix the conflicts later today and will mention you after it's done! |
This PR adds more Nushell support to the Vite+ global CLI setup and environment commands.
It introduces:
vp env doctorIt also refactors shared shell/profile handling to keep setup, doctor, and cleanup behavior consistent across shells and platforms.