Add shell completion kind values and man page generation#878
Open
lamchau wants to merge 2 commits intodalance:masterfrom
Open
Add shell completion kind values and man page generation#878lamchau wants to merge 2 commits intodalance:masterfrom
kind values and man page generation#878lamchau wants to merge 2 commits intodalance:masterfrom
Conversation
Inject KIND_LIST entries as possible values into the clap Command used for completion generation, so --sorta, --sortd, --insert, and --only now offer tab-completable kind names with descriptions.
Add --gen-man-page flag that renders a man page to stdout. Build-time generation is also supported via the MAN_PATH env var, mirroring the existing COMPLETION_PATH pattern.
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
--sorta,--sortd,--insert, and--onlynow include all valid column kind names with descriptions, enabling tab-completion in fish, bash, and zsh--gen-man-pageflag and build-time man page generation viaclap_mangen(controlled byMAN_PATHenv var)Shell completion output
Kind values are injected only into the completion generator, preserving existing partial/substring matching at runtime (e.g.
--sorta cpustill works).fish (with descriptions):
bash:
zsh (with descriptions):
Man page
Build-time generation:
Test plan (macOS/Ubuntu)
cargo buildsucceedscargo test— 9/9 passprocs --sorta cpu— partial matching still worksfish/bash/zshcompletions include kind valuesprocs --gen-man-pageoutputs valid roff (manmarkup)