nushell / nushell/nu_scripts

cargo completion make `--` argument not working.

Open
#1,004 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
1.3k
Forks
323
Avg merge
2h 55m
Merged PRs (30d)
3

Description

cargo clippy --workspace -- -D warnings -D clippy::unwrap_used

will produced like:


error: unexpected argument '-' found

Usage: cargo.exe check [OPTIONS]

cargo test -- --nocapture

will produced like:

error: unexpected argument '--nocapture' found

  tip: a similar argument exists: '--features'
  tip: to pass '--nocapture' as a value, use '-- --nocapture'

Usage: cargo.exe test --features <FEATURES> <TESTNAME> [-- [ARGS]...]

For more information, try '--help'.

I must do the work like ^cargo test -- --nocapture , How can I fix this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported commands, cargo clippy --workspace -- -D warnings -D clippy::unwrap_used and cargo test -- --nocapture, through the affected completion. Trace how arguments after -- are emitted, then verify that the completed commands preserve the separator and pass the remaining arguments through unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.