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

Support request: Where to install elvish completions in distro packages? #1739

Open
VorpalBlade opened this issue Dec 25, 2023 · 2 comments
Open

Comments

@VorpalBlade
Copy link

VorpalBlade commented Dec 25, 2023

I'm writing some software that supports shell completions, using the Rust library (crate) bpaf. It has support for generating completion files for several different shells, including elvish.

I'm also packaging my software for Arch Linux (possibly other distros as well down the line). As part of that I install the completions as part of the package in the system location for the shell. Unfortunately I haven't been able to find out where I'm supposed to put completion files for elvish. I.e. what goes on the last line of this:

    "$_cmd_name" --bpaf-complete-style-zsh > "$pkgdir/usr/share/zsh/site-functions/_${pkgname}"
    "$_cmd_name" --bpaf-complete-style-bash > "$pkgdir/usr/share/bash-completion/completions/${pkgname}"
    "$_cmd_name" --bpaf-complete-style-fish > "$pkgdir/usr/share/fish/vendor_completions.d/${pkgname}.fish"
    # TODO: Where do completions for elvish go?
    #"$_cmd_name" --bpaf-complete-style-elvish

(I don't use elvish myself, I'm a zsh user, but I want to make the experience as good as possible for users of all supported shells.)

@str4d
Copy link

str4d commented Jan 19, 2024

This is a duplicate of #1564; see the discussion there, which indicates that no such automatic discovery path currently exists.

@VorpalBlade
Copy link
Author

Thank you. The reasoning seems strange (if I install a command I trust it (or I would sandbox it with flatpak), so there is little point in not also trusting the completion files, especially since they are usually installed by distro packages anyway, and installing a distro package is an act of trust).

I'm having a hard time seeing the security angle on this, since all the relevant code is in the same trust level, thus if I'm evil I could for example just patch your init file instead.

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

2 participants