Shell completions#16
Merged
rayokamoto merged 9 commits intomainfrom May 1, 2026
Merged
Conversation
6beda9a to
64d18c2
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds dynamic shell completions for aucpl (bash/zsh/fish) by introducing an internal completion subcommand and extending shellinit to register shell hooks, with README updates describing how to enable them.
Changes:
- Add a hidden
__completesubcommand that prints completion candidates based on CLI context and project state. - Extend
aucpl shellinitto install completion hooks for bash/zsh and fish in addition to the existingaucpl cdwrapper. - Update README instructions to enable the shell hook for bash/zsh and fish and show completion examples.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/cli/src/main.rs | Routes the new internal __complete subcommand to its handler. |
| crates/cli/src/cli/mod.rs | Registers the new complete module and adds it to the builtin command list. |
| crates/cli/src/cli/complete.rs | Implements the hidden __complete command that emits completion candidates. |
| crates/cli/src/cli/shellinit.rs | Emits shell integration snippets to enable wrappers + completions. |
| README.md | Documents enabling the shell hook and demonstrates the new completions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rayokamoto
requested changes
Apr 29, 2026
Use a manual loop instead of mapfile to do completions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Unquoted substitution does work, but it is safer to use the quoted version Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2b56b41 to
28546cc
Compare
rayokamoto
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add shell completions for zsh, bash, and fish.
They will complete competitions after
-cor as the anonymous arg inaucpl comp finish, etc. They will complete problems after-pand other relevant spot. They will also complete for exampleaucpl <tab>, suggesting problem, comp, etc using Clap introspection.Again, this requires evaluating
aucpl shellinit.