mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
fix(error): Consistently indent suggestions
This commit is contained in:
parent
de9b92cf55
commit
a4bcba6840
2 changed files with 7 additions and 5 deletions
|
@ -194,9 +194,11 @@ fn write_dynamic_context(error: &crate::error::Error, styled: &mut StyledStr) ->
|
|||
|
||||
let suggestion = error.get(ContextKind::SuggestedCommand);
|
||||
if let Some(ContextValue::String(suggestion)) = suggestion {
|
||||
styled.none("\n\n");
|
||||
styled.none(TAB);
|
||||
styled.none(
|
||||
"\n\nIf you believe you received this message in error, try re-running with '",
|
||||
);
|
||||
"If you believe you received this message in error, try re-running with '",
|
||||
);
|
||||
styled.good(suggestion);
|
||||
styled.none("'");
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ error: The subcommand 'subcm' wasn't recognized
|
|||
|
||||
Did you mean 'subcmd'?
|
||||
|
||||
If you believe you received this message in error, try re-running with 'dym -- subcm'
|
||||
If you believe you received this message in error, try re-running with 'dym -- subcm'
|
||||
|
||||
Usage: dym [COMMAND]
|
||||
|
||||
|
@ -123,7 +123,7 @@ error: The subcommand 'te' wasn't recognized
|
|||
|
||||
Did you mean 'test', 'temp'?
|
||||
|
||||
If you believe you received this message in error, try re-running with 'dym -- te'
|
||||
If you believe you received this message in error, try re-running with 'dym -- te'
|
||||
|
||||
Usage: dym [COMMAND]
|
||||
|
||||
|
@ -524,7 +524,7 @@ error: The subcommand 'baz' wasn't recognized
|
|||
|
||||
Did you mean 'bar'?
|
||||
|
||||
If you believe you received this message in error, try re-running with ' -- baz'
|
||||
If you believe you received this message in error, try re-running with ' -- baz'
|
||||
|
||||
Usage: <COMMAND>
|
||||
|
||||
|
|
Loading…
Reference in a new issue