aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/cli/explain_config.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/cli/explain_config.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/cli/explain_config.zig')
-rw-r--r--vendor/libghostty-vt/src/cli/explain_config.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/cli/explain_config.zig b/vendor/libghostty-vt/src/cli/explain_config.zig
index 4f034afe..6f03256d 100644
--- a/vendor/libghostty-vt/src/cli/explain_config.zig
+++ b/vendor/libghostty-vt/src/cli/explain_config.zig
@@ -7,6 +7,7 @@ const Config = @import("../config/Config.zig");
const ConfigKey = @import("../config/key.zig").Key;
const KeybindAction = @import("../input/Binding.zig").Action;
const Pager = @import("Pager.zig");
+const global = @import("../global.zig");
pub const Options = struct {
/// The config option to explain. For example:
@@ -51,7 +52,7 @@ pub fn run(alloc: Allocator) !u8 {
var positional: ?[]const u8 = null;
var no_pager: bool = false;
- var iter = try args.argsIterator(alloc);
+ var iter = try args.argsIterator(alloc, global.args());
defer iter.deinit();
defer if (option_name) |s| alloc.free(s);
defer if (keybind_name) |s| alloc.free(s);
@@ -75,9 +76,9 @@ pub fn run(alloc: Allocator) !u8 {
// respective lookup. A bare positional argument tries config
// options first, then keybind actions as a fallback.
const name = keybind_name orelse option_name orelse positional orelse {
- var stderr: std.fs.File = .stderr();
+ var stderr: std.Io.File = .stderr();
var buffer: [4096]u8 = undefined;
- var stderr_writer = stderr.writer(&buffer);
+ var stderr_writer = stderr.writer(global.io(), &buffer);
try stderr_writer.interface.writeAll("Usage: ghostty +explain-config <option>\n");
try stderr_writer.interface.writeAll(" ghostty +explain-config --option=<option>\n");
try stderr_writer.interface.writeAll(" ghostty +explain-config --keybind=<action>\n");
@@ -92,7 +93,7 @@ pub fn run(alloc: Allocator) !u8 {
else
explainOption(name) orelse explainKeybind(name);
- var pager: Pager = if (!no_pager) .init(alloc) else .{};
+ var pager: Pager = if (!no_pager) .init() else .{};
defer pager.deinit();
var buffer: [4096]u8 = undefined;
const writer = pager.writer(&buffer);