diff --git a/src/cli_util.rs b/src/cli_util.rs index bffbc1d51..7ba597be4 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -2168,6 +2168,10 @@ pub fn handle_command_result( } Err(CommandError::ConfigError(message)) => { writeln!(ui.error(), "Config error: {message}")?; + writeln!( + ui.hint(), + "For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md." + )?; Ok(ExitCode::from(1)) } Err(CommandError::CliError(message)) => { diff --git a/tests/test_global_opts.rs b/tests/test_global_opts.rs index ccf9c7963..91105d16b 100644 --- a/tests/test_global_opts.rs +++ b/tests/test_global_opts.rs @@ -326,6 +326,7 @@ fn test_invalid_config() { let stderr = test_env.jj_cmd_failure(test_env.env_root(), &["init", "repo"]); insta::assert_snapshot!(stderr.replace('\\', "/"), @r###" Config error: expected newline, found an identifier at line 1 column 10 in config/config0001.toml + For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md. "###); }