From 755acabd47093f7d11d0d6a2dec9c146c601a8f3 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Tue, 27 Jan 2026 12:45:37 +1100 Subject: [PATCH] Highlight command argument completions in cyan - /run path completions shown in cyan - /resume session ID completions shown in cyan - /project name completions shown in cyan --- crates/g3-cli/src/completion.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/g3-cli/src/completion.rs b/crates/g3-cli/src/completion.rs index fa7e18b..ac46847 100644 --- a/crates/g3-cli/src/completion.rs +++ b/crates/g3-cli/src/completion.rs @@ -270,18 +270,27 @@ impl Completer for G3Helper { if line_to_cursor.starts_with("/run ") { let path = self.strip_quotes(word); let (_, completions) = self.file_completer.complete(path, path.len(), ctx)?; - return Ok((word_start, completions)); + // Cyan color for command argument completions + let cyan_completions: Vec = completions + .into_iter() + .map(|p| Pair { + display: format!("\x1b[36m{}\x1b[0m", p.display), + replacement: p.replacement, + }) + .collect(); + return Ok((word_start, cyan_completions)); } // Case 4: Session ID completion for /resume command if line_to_cursor.starts_with("/resume ") { let partial = word; let sessions = self.list_sessions(None); + // Cyan color for command argument completions let matches: Vec = sessions .into_iter() .filter(|s| s.starts_with(partial)) .map(|s| Pair { - display: s.clone(), + display: format!("\x1b[36m{}\x1b[0m", s), replacement: s, }) .take(8) @@ -293,12 +302,13 @@ impl Completer for G3Helper { if line_to_cursor.starts_with("/project ") { let partial = word; let projects = self.list_projects(partial); + // Cyan color for command argument completions let matches: Vec = projects .into_iter() .map(|name| { let full_path = format!("~/projects/{}", name); Pair { - display: name, + display: format!("\x1b[36m{}\x1b[0m", name), replacement: full_path, } })