mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
cli: include command to set config in hint about default command
When the user doesn't have a configured default command, we show a hint saying to set `ui.default-command`. I think the user is very likely to want to set that in the user-wide config, so let's include the command in the hint.
This commit is contained in:
parent
7ea05a69d5
commit
9feffa54c8
2 changed files with 2 additions and 2 deletions
|
@ -2688,7 +2688,7 @@ fn resolve_default_command(
|
||||||
)?;
|
)?;
|
||||||
writeln!(
|
writeln!(
|
||||||
ui.hint(),
|
ui.hint(),
|
||||||
"Set the config `ui.default-command = \"log\"` to disable this message."
|
"Run `jj config set --user ui.default-command log` to disable this message."
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
let default_command = config
|
let default_command = config
|
||||||
|
|
|
@ -68,7 +68,7 @@ fn test_no_subcommand() {
|
||||||
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &[]);
|
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &[]);
|
||||||
insta::assert_snapshot!(stderr, @r###"
|
insta::assert_snapshot!(stderr, @r###"
|
||||||
Hint: Use `jj -h` for a list of available commands.
|
Hint: Use `jj -h` for a list of available commands.
|
||||||
Set the config `ui.default-command = "log"` to disable this message.
|
Run `jj config set --user ui.default-command log` to disable this message.
|
||||||
Error: There is no jj repo in "."
|
Error: There is no jj repo in "."
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue