Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Add shell completions #65

Open
Freed-Wu opened this issue Sep 7, 2022 · 0 comments
Open

[feature] Add shell completions #65

Freed-Wu opened this issue Sep 7, 2022 · 0 comments

Comments

@Freed-Wu
Copy link
Contributor

Freed-Wu commented Sep 7, 2022

Just change Makefile to install /usr/share/zsh/site-functions/_has:

#compdef has

_arguments -s -S \
  -q'[Silent mode]' \
  {-h,--help}'[Display this help text and quit]' \
  {-V,--version}'[Show version number and quit]' \
  '*: :{_command_names -e}'
❯ has -<TAB>
external command
option
-h          Display this help text and quit
--help      Display this help text and quit
-q          Silent mode
--version   Show version number and quit
-V          Show version number and quit
❯ has -q <TAB>
external command
7za                                 A file archiver with highest compression ratio
7z                                  A file archiver with highest compression ratio
7zr                                 A file archiver with highest compression ratio
a2ping                              convert between PS, EPS and PDF and other page description formats
a52dec                              decode ATSC A/52 audio streams
...

TIA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant