-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Having a shell completion improves developers' workflow and makes it easier for everyone to notice as the program gains new options. This commit adds support for generatic static completion files via shtab. Unlike other solutions which repeatedly invoke the underlying program, to retrieve the next suggestion, shtab parses argparse options and produces a complete static file. It currently supports bash, tcsh and bash with PR opened for fish support. For example, to generate zsh completion use: - reuse --print-completion zsh > /usr/share/zsh/site-functions/_reuse This can be done by the reuse project itself, the package maintainer or end-user. For more details, see https://github.com/iterative/shtab Closes: #629 Co-authored-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com
- Loading branch information
1 parent
26f0be9
commit 814627b
Showing
9 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
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
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 @@ | ||
- Added `--print-completion` using a new `shtab` optional dependency. (#1076) |
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
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
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