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

Better shell completion support for packages #44756

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

alecbcs
Copy link
Member

@alecbcs alecbcs commented Jun 18, 2024

This PR adds a standardized way to add shell completion support to packages using ripgrep, fd, restic, and rclone as examples.

@spackbot-app spackbot-app bot added core PR affects Spack core functionality update-package labels Jun 18, 2024
@alecbcs alecbcs changed the title fd, ripgrep: better shell completion support fd, ripgrep, rclone: better shell completion support Jun 18, 2024
@alecbcs alecbcs changed the title fd, ripgrep, rclone: better shell completion support Better shell completion support for packages Jun 18, 2024
@alecbcs alecbcs force-pushed the fix/better-shell-completions branch from 6073ec8 to 2e8ee11 Compare June 20, 2024 14:36
@alecbcs alecbcs force-pushed the fix/better-shell-completions branch from 2e8ee11 to caecde2 Compare June 20, 2024 14:37
Comment on lines +1421 to +1431
@property
def bash_completion_path(self):
return f"{self.prefix}/share/bash-completion/completions"

@property
def zsh_completion_path(self):
return f"{self.prefix}/share/zsh/site-functions"

@property
def fish_completion_path(self):
return f"{self.prefix}/share/fish/vendor_completions.d"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if these attributes are best kept in a mixin, rather than extending the PackageBase class. That class is a bit overloaded with responsibilities atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core PR affects Spack core functionality update-package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants