Skip to content

Commit 268267b

Browse files
authored
fix: the completion subcommand should assume the CLI is named codex, not codex-cli (#1496)
Current 0.4.0 release: ``` ~/code/codex2/codex-rs$ codex completion | head _codex-cli() { local i cur prev opts cmd COMPREPLY=() if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then cur="$2" else cur="${COMP_WORDS[COMP_CWORD]}" fi prev="$3" cmd="" ``` with this change: ``` ~/code/codex2/codex-rs$ just codex completion | head cargo run --bin codex -- "$@" Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.82s Running `target/debug/codex completion` _codex() { local i cur prev opts cmd COMPREPLY=() if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then cur="$2" else cur="${COMP_WORDS[COMP_CWORD]}" fi prev="$3" cmd="" ```
1 parent 4a15ebc commit 268267b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codex-rs/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ fn prepend_config_flags(
155155

156156
fn print_completion(cmd: CompletionCommand) {
157157
let mut app = MultitoolCli::command();
158-
let name = app.get_name().to_string();
158+
let name = "codex";
159159
generate(cmd.shell, &mut app, name, &mut std::io::stdout());
160160
}

0 commit comments

Comments
 (0)