Right-clicking a folder has always opened the configured default shell — usually PowerShell — with no way to ask for a WSL distribution instead. - `--shell <id>` takes the same ids the `shell` setting uses (`pwsh`, `cmd`, `wsl:Ubuntu`, or an imported profile's settings id) and applies to the first tab this process creates. It carries an id rather than a path so every launch re-resolves the executable. - The id travels both startup paths: the cold start (`run_shell` → `WorkspaceStartup::NewTerminal`), and the resident hand-off, which is the common case on Windows. `tab.new`/`window.create` gained an optional `shell` field, so clicking the menu while Pebrel is already running adds a tab to the existing window instead of starting a second process. - An explicit request never silently degrades. An unresolvable id fails (`invalid_shell`, or a startup error before any window opens), and a `wsl:<distro>` id that the registry no longer lists still launches `wsl.exe -d <distro>`, leaving the complaint to the distribution itself. The `shell` setting keeps its documented fallback to the platform default. - The winit shell rejects a shell request instead of ignoring it, so the caller falls back to a cold GPUI start and still gets the requested shell. The resolution lives in a new `workspace::shell_launch` module: `main.rs` has to validate `--shell` before it opens a window, and none of it needs `NebulaWorkspace` state — `workspace.rs` is also at its line budget, which this keeps from growing (`architecture/file-budgets.txt`). The installer registers one context-menu entry per registered WSL distribution (`PebrelWsl<n>`, skipping `docker-desktop*`) and the uninstaller reclaims them by key prefix plus the command line it wrote. `--shell` is passed before `--working-directory`: a drive-root `%V` ends in `\"`, which would swallow the rest of the line if the directory came first. Both the string and the order are pinned by installer assertions. Docs (runtime API schema + control API) and shell completions are updated.
Shell completion snapshots
The files in this directory describe the Unix GPUI CLI used by Linux and macOS.
windows/ contains the Windows GPUI CLI snapshots, including Windows-only commands.
Linux packaging installs the Unix files; neither platform should reuse the other's snapshots.
After changing CLI options, regenerate on both Windows and Unix with the same locked dependencies:
cargo test --locked -p nebula --bin pebrel cli::tests::regenerate_completions -- --ignored --exact
cargo test --locked -p nebula --bin pebrel cli::tests::completions -- --exact
The regeneration command selects the host's snapshot directory. Set
PEBREL_COMPLETION_OUTPUT to write generated files to a separate review directory instead.
NEBULA_COMPLETION_OUTPUT remains a fallback for existing maintenance scripts.