Skip to content

feat(cli): add 'concore completion' for bash, zsh and fish - #694

Merged
pradeeban merged 3 commits into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-completion
Nov 28, 2026
Merged

pradeeban merged 3 commits into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-completion

Conversation

@yadavchiragg

Copy link
Copy Markdown

Why

concore has a dozen commands and options such as --type windows|posix|docker, but no shell completion.

What

concore completion <bash|zsh|fish> prints the tab-completion script generated by Click's built-in support (Click >= 8.0, which is already the minimum). One line in the shell startup file enables it, documented in the CLI README:
eval "$(concore completion zsh)"

Testing

  • tests/test_completion_command.py (7 tests): script is produced for each shell, unknown shell rejected, commands/option values/shell names are completed
  • ran the generated bash script in a real bash: va -> validate, --ty -> --type, --type <TAB> -> windows posix docker
  • existing CLI tests unchanged, ruff clean
  • zsh and fish scripts are Click's standard ones; only checked that they print

Docs

Added concore completion to concore_cli/README.md

Prints the Click-generated tab-completion script so commands, options and option values complete in the shell. Verified with real bash completion. Tests and docs included.
@pradeeban

Copy link
Copy Markdown
Member

Merge conflicts. Pls check, @yadavchiragg

@pradeeban
pradeeban marked this pull request as draft November 27, 2026 03:14
@yadavchiragg

Copy link
Copy Markdown
Author

@pradeeban I merged the latest dev and resolved the conflicts in cli.py and README.md (both concore logs and concore completion are kept). The remaining red checks are not from this PR: test (3.9) and the cancelled 3.10-3.12 jobs come from the Ubuntu 26.04 / Python 3.9 problem that #678 fixes, and the cpp-* jobs come from the params path in the C++ test that #714 fixes. I'll re-run CI here once those are merged.

@pradeeban

Copy link
Copy Markdown
Member

Looks like some more merge conflicts, @yadavchiragg

@pradeeban
pradeeban marked this pull request as ready for review November 28, 2026 03:12
@pradeeban
pradeeban merged commit b822b54 into ControlCore-Project:dev Nov 28, 2026
12 of 17 checks passed
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.

2 participants