ok/jj
1
0
Fork 0
forked from mirrors/jj

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:
Martin von Zweigbergk 2024-02-06 09:17:12 -08:00 committed by Martin von Zweigbergk
parent 7ea05a69d5
commit 9feffa54c8
2 changed files with 2 additions and 2 deletions

View file

@ -2688,7 +2688,7 @@ fn resolve_default_command(
)?;
writeln!(
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

View file

@ -68,7 +68,7 @@ fn test_no_subcommand() {
let stderr = test_env.jj_cmd_failure(test_env.env_root(), &[]);
insta::assert_snapshot!(stderr, @r###"
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 "."
"###);