From b16c985ed23441f2937cfb576e8aebf4c411ae4e Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 7 Oct 2025 08:07:31 -0700 Subject: [PATCH] cli: fix zsh completion (#4692) Before this change: ``` tamird@L03G26TD12 codex-rs % codex zsh: do you wish to see all 3864 possibilities (1285 lines)? ``` After this change: ``` tamird@L03G26TD12 codex-rs % codex app-server -- [experimental] Run the app server apply a -- Apply the latest diff produced by Codex agent as a `git apply` to your local working tree cloud -- [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally completion -- Generate shell completion scripts debug -- Internal debugging commands exec e -- Run Codex non-interactively generate-ts -- Internal: generate TypeScript protocol bindings help -- Print this message or the help of the given subcommand(s) login -- Manage login logout -- Remove stored authentication credentials mcp -- [experimental] Run Codex as an MCP server and manage MCP servers mcp-server -- [experimental] Run the Codex MCP server (stdio transport) responses-api-proxy -- Internal: run the responses API proxy resume -- Resume a previous interactive session (picker by default; use --last to continue the most recent) ``` --- codex-rs/exec/src/cli.rs | 4 ++-- codex-rs/tui/src/cli.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index 323cc879..d264eb61 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -77,7 +77,7 @@ pub struct Cli { /// Initial instructions for the agent. If not provided as an argument (or /// if `-` is used), instructions are read from stdin. - #[arg(value_name = "PROMPT")] + #[arg(value_name = "PROMPT", value_hint = clap::ValueHint::Other)] pub prompt: Option, } @@ -99,7 +99,7 @@ pub struct ResumeArgs { pub last: bool, /// Prompt to send after resuming the session. If `-` is used, read from stdin. - #[arg(value_name = "PROMPT")] + #[arg(value_name = "PROMPT", value_hint = clap::ValueHint::Other)] pub prompt: Option, } diff --git a/codex-rs/tui/src/cli.rs b/codex-rs/tui/src/cli.rs index f0630a34..ee2a0355 100644 --- a/codex-rs/tui/src/cli.rs +++ b/codex-rs/tui/src/cli.rs @@ -7,7 +7,7 @@ use std::path::PathBuf; #[command(version)] pub struct Cli { /// Optional user prompt to start the session. - #[arg(value_name = "PROMPT")] + #[arg(value_name = "PROMPT", value_hint = clap::ValueHint::Other)] pub prompt: Option, /// Optional image(s) to attach to the initial prompt.