Open
Description
Problem
When using cargo run
, it can be hard to distinguish output from cargo and output from the spawned executable, especially if both are using clap. Take for example this error:
$ cargo r --exe
error: unexpected argument '--exe' found
tip: to pass '--exe' as a value, use '-- --exe'
Usage: run --features <FEATURES> [ARGS]...
For more information, try '--help'.
and compare it to this one:
$ cargo r -- --exe
error: a value is required for '--exe <filename>' but none was supplied
For more information, try '--help'.
both of these look similar, and it is hard to tell what's happening at a glance.
Proposed Solution
Prefix each error:
diagnostic with cargo:
; the example above would start with cargo: error: unexpected argument '--exe' found
Notes
maybe it sense to do this for everyone upstream in clap instead of just for cargo?