diff --git a/src/cli/validate_config.zig b/src/cli/validate_config.zig index 4dcf7f72a..b61e0cdaf 100644 --- a/src/cli/validate_config.zig +++ b/src/cli/validate_config.zig @@ -20,7 +20,12 @@ pub const Options = struct { } }; -/// The `validate-config` command is used to validate a Ghostty config +/// The `validate-config` command is used to validate a Ghostty config file. +/// +/// When executed without any arguments, this will load the config from the default location. +/// +/// The `--config-file` argument can be passed to validate a specific target config +/// file in a non-default location. pub fn run(alloc: std.mem.Allocator) !u8 { var opts: Options = .{}; defer opts.deinit(); diff --git a/src/config/Config.zig b/src/config/Config.zig index ca185f2ed..090c8a77d 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -1686,6 +1686,7 @@ pub fn loadIter( try cli.args.parse(Config, alloc, self, iter); } +/// Load configuration from the target config file at `path`. pub fn loadFile(self: *Config, alloc: Allocator, path: []const u8) !void { var file = try std.fs.cwd().openFile(path, .{}); defer file.close();