-
Notifications
You must be signed in to change notification settings - Fork 81
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
shell completions #127
Comments
Should completions be auto-generated? This would avoid having to manually edit completion scripts, but also might require some restructuring of existing code. Alternatively, completions could be stored in their own file and not included in the binary. This would allow users to source a file rather than invoke playerctl every time they start their shell. |
What would the approach to this be? I don't want to add a runtime dependency for this.
There would be ways to implement this command without storing the completions in the binary such as reading from a well-known path. |
The approach I started with was to start by moving the Thinking through that, though, it seems pretty convoluted and it would be a lot of work for very little accomplishment. The idea behind putting them in their own file would be that the user never has to invoke playerctl at all when starting their shell. How much that actually matters is debatable, but personally I don't like the idea of running a program like playerctl in my shell rc. |
I like the idea in general, but I think it's beyond the scope of this project to put the generator in playerctl itself. It might be interesting to think about some sort of DSL or introspection mechanism that could generate completions from configuration at compile time. I have some other projects where that would be useful too.
We can accommodate that. |
That's true. In the end, if the user just wants to source a file when their shell starts, they can |
The Fedora package now installs the Bash completions: |
There's a compatibility mode for zsh, so this is good enough for me.
|
It would be cool if you could have shell completions in the binary and use them in your shell rc file like this:
The text was updated successfully, but these errors were encountered: