Add Nushell support to the Windows shell picker
What problem does this solve?
On Windows, the "Integrated terminal shell" picker (Settings → Editor) offers PowerShell, Windows PowerShell, Command Prompt, and Git Bash, but not Nushell. windows::list_shells() only probes for those four binaries, so Nushell users can't pick it as their default terminal shell at all — "Auto" won't find it either.
Proposed solution
Two tiers, already implemented and verified locally against a real build:
- Basic: detect
nu.exeon PATH and list it in the shell picker, same tier as Command Prompt today — selectable, correct cwd/env on launch, no OSC 7/133 integration yet. - Full: the same OSC 7/133 cwd-tracking + command-blocks integration that PowerShell/bash/zsh/fish already get, via a new
scripts/init.nusourced through nu's--executeflag. Nu has no fish-style auto-loadedconf.d, and its hooks (pre_prompt/pre_execution) are ordinary appendable lists distinct from the prompt string (PROMPT_COMMAND), so the mechanism is a bit different from the existing shells — happy to walk through it in the PR.
I have a working patch ready (2 commits, rebased onto current main): basic detection, then full integration on top. Verified end-to-end in a real built app — command blocks render, cwd tracking follows cd, exit-code styling works, unicode round-trips cleanly. Full test suite passes, plus a new unit test locking in the shell-spawn argument construction. cargo fmt/clippy clean on the touched files.
Scoped to native Windows only for now — WSL/Unix parity (Shell::Nu/ShellKind::Nu variants mirroring the existing WSL zsh/bash/fish handling) would be natural follow-up work if there's interest, kept out of this first pass to keep the change focused.
Alternatives considered
You can already run nu manually from inside another shell (type nu in a PowerShell/cmd tab), but that's not a persistent default-shell choice, doesn't appear as its own picker entry, and has to be retyped in every new tab.
Are you willing to contribute the implementation?
Yes, I can do it — already done locally, opening this issue first per CONTRIBUTING.md before submitting the PR.
Before submitting
- I searched existing issues and didn't find a duplicate
Source: crynta/terax-ai