Conversation
Per fdncred's recommendation in nushell/nushell#18128, replaces the parameter-level `[...args: string@"nu-complete wt"]` with a function-level `@complete` attribute on an untyped `[...args]` rest. The completer signature moves from `[context: string]` (with manual `split row " "` reconstruction) to `[spans: list<string>]`, which nushell pre-tokenizes — net deletion of seven lines of fragile token reassembly. Untyped rest is the form nushell routes through its normal external-argument handling, so once nushell/nushell#18131 ships in stable nu the wrapper will automatically benefit from `--flag="value"` quote stripping and `~` expansion without further changes. Until then `--flag="value"` still arrives at the binary with literal quotes — a pre-existing bug, not a regression introduced here. This change supersedes PR #2437 (the body-level regex strip workaround). Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per fdncred's recommendation in nushell/nushell#18128, replaces the parameter-level
[...args: string@\"nu-complete wt\"]with a function-level@completeattribute on an untyped[...args]rest. The completer signature moves from[context: string](with manualsplit row \" \"reconstruction) to[spans: list<string>], which nushell pre-tokenizes — net deletion of seven lines of fragile token reassembly.Untyped rest is the form nushell routes through its normal external-argument handling, so once nushell/nushell#18131 ships in stable nu the wrapper will automatically benefit from
--flag=\"value\"quote stripping and~expansion without further changes. Until then--flag=\"value\"still arrives at the binary with literal quotes — a pre-existing bug, not a regression introduced here. Supersedes #2437 (the body-level regex strip workaround).Test plan
cargo test --test integration --features shell-integration-tests— 1717 passed (including all four nu wrapper cases)pre-commit run --all-files— cleanwt switch <TAB>) in an interactive nu session — couldn't drive reedline via PTY in test, but fdncred's example in Parity with bare external tokenization for--wrapped/externrest args (--flag="value") nushell/nushell#18128 impliesspansis populated at the cursor positionRef nushell/nushell#18128, nushell/nushell#18131