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

[FEAT] Please add completion for zsh #1197

Closed
AtifChy opened this issue Aug 18, 2024 · 5 comments
Closed

[FEAT] Please add completion for zsh #1197

AtifChy opened this issue Aug 18, 2024 · 5 comments
Labels
enhancement New feature or request help wanted

Comments

@AtifChy
Copy link
Contributor

AtifChy commented Aug 18, 2024

Be sure to read FAQ before submitting a new issue.

Wanted features:

fastfetch has a vast number of options available, it would be much easier to traverse around these options with tab completion instead of opening the man page over and over.

Motivation:

currently fastfetch has completion support for fish shell with proper description beside each option, having the same completion with zsh would be awesome.

@AtifChy AtifChy added the enhancement New feature or request label Aug 18, 2024
@CarterLi
Copy link
Member

You can try carapace-bin https://github.com/carapace-sh/carapace-bin

@AtifChy
Copy link
Contributor Author

AtifChy commented Aug 18, 2024

@CarterLi i noticed that a python script being used to generate the completions for fish shell, can't the same be done for zsh. carapace-bin looks interesting, but i would prefer native shell completion.

@CarterLi
Copy link
Member

CarterLi commented Aug 19, 2024

i noticed that a python script being used to generate the completions for fish shell, can't the same be done for zsh

You still need to know the syntax of zsh script to generate the completions.

You can try it yourself if you have interest. fastfetch --help-raw prints a JSON document that contains all command line options. All you need to do is parse the JSON document and generate zsh completion command with it.

Otherwise you have to wait other people to contribute.

@aymen-3
Copy link

aymen-3 commented Aug 22, 2024

Since fastfetch has a --help option, you can add this line to your .zshrc file and it will have completion:

compdef _gnu_generic fastfetch

@CarterLi
Copy link
Member

Since fastfetch has a --help option, you can add this line to your .zshrc file and it will have completion:

compdef _gnu_generic fastfetch

No. It doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted
Projects
None yet
Development

No branches or pull requests

3 participants