mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
docs: add docstrings
This commit is contained in:
@ -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 {
|
pub fn run(alloc: std.mem.Allocator) !u8 {
|
||||||
var opts: Options = .{};
|
var opts: Options = .{};
|
||||||
defer opts.deinit();
|
defer opts.deinit();
|
||||||
|
@ -1686,6 +1686,7 @@ pub fn loadIter(
|
|||||||
try cli.args.parse(Config, alloc, self, iter);
|
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 {
|
pub fn loadFile(self: *Config, alloc: Allocator, path: []const u8) !void {
|
||||||
var file = try std.fs.cwd().openFile(path, .{});
|
var file = try std.fs.cwd().openFile(path, .{});
|
||||||
defer file.close();
|
defer file.close();
|
||||||
|
Reference in New Issue
Block a user