-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
enhancementa request to improve CLIa request to improve CLIhelp wantedContributions welcomeContributions welcome
Description
Describe the feature or problem you’d like to solve
RPM and DEB packages created as part of the release process do not generate shell completion scripts. Those scripts need to be manually generated by the user after installation or update.
Proposed solution
Pre-generate completion scripts and package them to be deployed in respective completion locations for common shells.
Bash: /usr/share/bash-completion/completions/gh
Fish: /usr/share/fish/vendor_completions.d/gh.fish
Zsh: /usr/share/zsh/site-functions/_gh
Additional context
It is the behavior of RPMs generated by fedora repos:
https://src.fedoraproject.org/rpms/gh/blob/f37/f/gh.spec#_68
# Generate shell completions
%{gobuilddir}/bin/%{name} completion -s bash > %{name}.bash
%{gobuilddir}/bin/%{name} completion -s fish > %{name}.fish
%{gobuilddir}/bin/%{name} completion -s zsh > %{name}.zsh
# Install shell completions
install -Dpm 0644 %{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name}
install -Dpm 0644 %{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
install -Dpm 0644 %{name}.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIhelp wantedContributions welcomeContributions welcome