feat(cli): grok-style clap completions with tiny rc hook - #37
Open
Blankeos wants to merge 2 commits into
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Deploying crabcode with
|
| Latest commit: |
646827f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://72f1421f.crabcode.pages.dev |
| Branch Preview URL: | https://feat-clap-completion-install.crabcode.pages.dev |
Blankeos
force-pushed
the
feat/clap-completion-install
branch
from
August 29, 2026 05:34
5445899 to
294eea0
Compare
`crabcode completion <shell>` prints a clap_complete script. `--install` writes it to the autoload path and a marked rc block appended after other installers. Zsh uses fpath + autoload + compdef so the script is not sourced at startup (parsed on first Tab). `#compdef` includes aliases discovered from `.zshrc` at install time. clap#6282: drop the unused prompt slot.
Blankeos
force-pushed
the
feat/clap-completion-install
branch
from
August 29, 2026 19:43
7574c97 to
9f95d32
Compare
…HOME dotsources, strip old inline dumps - Default shell from `$SHELL` env var (zsh/fish/elvish/pwsh, else bash) - Script paths use `$XDG_DATA_HOME` / `$XDG_CONFIG_HOME` when set - Bash falls back to `.bash_profile` when `.bashrc` is absent - PowerShell hooks dotsource `"$HOME/..."` instead of bare `~` - Strip old inline completion dumps from rc before installing marked block - Add CI workflow for rustfmt + completion tests on PRs - Add PR review doc - Update README and npm/README with XDG, $SHELL default, and re-run note - 19 completion tests pass chore(ci): drop PR Actions workflow Too expensive, and cargo test hits build.rs requiring remote-client assets. Keep local completion tests; merge confidence stays 4.5/5.
Blankeos
force-pushed
the
feat/clap-completion-install
branch
from
August 29, 2026 21:14
56b69cc to
646827f
Compare
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.
Summary
Grok-style
crabcode completion <shell>on clap. Tiny rc hook; clap_complete Tab UX.What
crabcode completion zsh/bash/fish/elvish/powershell— prints the script--installwrites the autoload file + a marked rc block appended at the end-prefix then flags, same as grok).zshrcforalias foo=crabcodeinto#compdef(no runtime loop, no hardcoded cc)[PROMPT]slot so nested commands completeInstall
crabcode completion zsh --install exec zshThen
crabcode completion <tab>→ shells;crabcode completion zsh <tab>→-then flags.