Skip to content

Conversation

@coder543
Copy link

Background

This small PR was written to solve a pain point I was experiencing. In trying to use the profiles feature extensively with local LLMs including gpt-oss-20b and gpt-oss-120b, I wanted to be able to more quickly type out the names, and I wanted to avoid the need to reference the config.toml file to remember names, so I added tab completion. Originally developed for fish, but I added support for bash and zsh as well.

Description

Generates dynamic --profile suggestions for fish, bash, and zsh by appending small helpers that call codex profiles list. Each script now delegates profile name discovery to the CLI instead of guessing from the filesystem, so completions stay accurate as users edit config.toml.

Adds a lightweight codex profiles list subcommand to feed those helpers and writes integration tests that assert the command output is wired into every supported shell. Updates the configuration docs to mention the inspection command for users who prefer to check profiles manually.

(I wish there were a more elegant way to support dynamic completions in clap, but modifying your own custom completions into the output is the most elegant way that appears to be available. clap still does most of the work.)

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coder543
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Oct 24, 2025
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@coder543 coder543 force-pushed the feature/profiles-completion branch from 5a8cf0c to e5771d9 Compare October 24, 2025 22:18
Generate dynamic `--profile` suggestions for fish, bash, and zsh by appending small helpers that call `codex profiles list`. Each script now delegates profile name discovery to the CLI instead of guessing from the filesystem, so completions stay accurate as users edit `config.toml`.

Add a lightweight `codex profiles list` subcommand to feed those helpers and write integration tests that assert the command output is wired into every supported shell. Update the configuration docs to mention the inspection command for users who prefer to check profiles manually.
@coder543 coder543 force-pushed the feature/profiles-completion branch from e5771d9 to eedca2c Compare October 24, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant