-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
hyprctl: Add shell completions #5404
Conversation
It would appear that this disregards nesting. It just gives the completion on the first level.
|
i see what you mean, |
I think its ready for revision |
There is a issue when doing |
Sourcing shouldn't be necessary. Shells will automatically load the completions from their default directories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested functionality in all the shells and it seems to be working fine.
I've also added the install instructions to meson.
LGTM. Thanks for the contribution!
|
||
<MONITORS> ::= {{{ hyprctl monitors | grep Monitor | awk '{ print $2 }' }}} | ||
|
||
<KEYWORDS> ::= {{{ hyprctl devices | sed -n '/Keyboard at/{n; s/^\s\+//; p}' }}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this supposed to be <KEYBOARDS>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it. I'll push a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also means that actual <KEYWORDS>
array is missing, referenced on line 71
I was too hasty in merging this. @LOSEARDES77 it looks like the |
I forgot to add the keywords |
I'll work on hyprpm completions today and add the missing keywords |
Can't find a way to retrieve aviable keywords |
https://github.com/scop/bash-completion/blob/master/README.md
for fish:
|
I see ill applt suggested changes to #5423 |
This could be improved a little further by taking inspiration from #3535 |
@Ordoviz I completely missed that PR, apologies. Can you rebase it and make whatever changes you see fit? |
Describe your PR, what does it fix/add?
Add shell completions for bash and fish for the hyprctl command
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Have only tested in bash and fish shell
Is it ready for merging, or does it need work?
Its still WIP
Its my first time experimenting with completions so i don`t know if this is the correct way of doing it but this just works for me
Fish:

Bash:
