From 59fb13892e8b85ebc835efd53bc582b7cf22f1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Arrufat?= Date: Tue, 9 Jun 2026 10:29:57 +0200 Subject: [PATCH] terminal: hint first slash command on single slash Triggers a ghost hint with the first matching slash command when the user inputs a single `/` character. --- src/agent/Terminal.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/agent/Terminal.zig b/src/agent/Terminal.zig index 69ec9835..c7341412 100644 --- a/src/agent/Terminal.zig +++ b/src/agent/Terminal.zig @@ -545,6 +545,8 @@ fn hintsCallback(input_c: [*c]const u8, arg: ?*anyopaque) callconv(.c) [*c]const // Inside an open `'''…'''` body the buffer is script text, not kv args. if (Schema.hasUnclosedTripleQuote(input)) return null; + if (std.mem.eql(u8, input, "/")) return ghostFirstMatch(&all_slash_names, "", ""); + if (Schema.parseSlashCommand(input)) |parts| { const ends_ws = input[input.len - 1] == ' '; if (Schema.findByName(parts.name)) |schema| {