fix(error): Consistently indent suggestions

This commit is contained in:
Ed Page 2022-10-13 12:10:13 -05:00
parent de9b92cf55
commit a4bcba6840
2 changed files with 7 additions and 5 deletions

View file

@ -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("'");
}

View file

@ -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>