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

Integrate completions into the homebrew completions directory #30

Open
aoberoi opened this issue Jul 10, 2023 · 0 comments
Open

Integrate completions into the homebrew completions directory #30

aoberoi opened this issue Jul 10, 2023 · 0 comments

Comments

@aoberoi
Copy link

aoberoi commented Jul 10, 2023

I recently ran into an issue where I wasn't able to get op completions to work. It turns out that the line I'm supposed to add to my .zshrc (eval "$(op completion zsh)"; compdef _op op) was too early, and needed to be placed after the call to compinit.

However, homebrew has a convention for packages to offer shell completions. Using this convention would eliminate the step where users have to add the line to their .zshrc (or equivalent shell dotfile). As far as I understand, the formula should use the generate_completions_from_executable() method in the formula. It seems like it would be pretty easy to integrate, given the op command can output its completions already. Here's an arbitrary example from the caddy formula.

I think this would remove the trickiest step from the install and make it so much cleaner. If this is something you'd take a contribution for, let me know, and I can send a PR.

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