forked from prefix-dev/rattler-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add completions generation for shells (prefix-dev#426)
- Loading branch information
1 parent
5ade85f
commit cfb664f
Showing
6 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# CLI Usage | ||
|
||
## Shell Completions | ||
|
||
We support shell completions through clap-complete. | ||
You can generate them for your shell using the `--generate` command. | ||
|
||
Eg, | ||
```sh | ||
rattler-build --generate=zsh > ${ZSH_COMPLETIONS_PATH:~/.zsh/completions}/_rattler-build | ||
compinit | ||
``` | ||
|
||
Ensure that whereever you install the is pointed to by your FPATH (for zsh or equivalent in other shells). | ||
Now you can use TAB or your configured completion key. :3 | ||
|
||
```sh | ||
$ rattler-build <TAB> | ||
build -- Build a package | ||
help -- Print this message or the help of the given subcommand(s) | ||
rebuild -- Rebuild a package | ||
test -- Test a package | ||
``` | ||
|
||
Example for Fish Shell just generate the `completions.fish` and add to `~/.config/fish/completions`. | ||
```sh | ||
rattler-build --generate=fish > ${ZSH_COMPLETIONS_PATH:~/.config/fish/completions}/rattler-build.fish | ||
``` | ||
|
This file contains 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
This file contains 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
This file contains 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