-
Notifications
You must be signed in to change notification settings - Fork 139
tools: add zsh completions #901
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
base: master
Are you sure you want to change the base?
Conversation
0db5968 to
31db0b6
Compare
|
I like to provide completions for the layouts/models/options, etc. but not sure there's a good way without parsing xkbcli output with yq or something. I don't particularly mind doing that, but obviously its better if we don't depend on an external tool. Do you think it would be possible to give xkbcli a more shell-parse friendly output? |
31db0b6 to
ed40d3d
Compare
|
Added some PoC RMLVO completers in the second commit, using yq. |
wismill
left a comment
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.
Great addition! Thanks!
91e59af to
8b8667c
Compare
|
The options RMLVO completer isn't working perfectly, as the group names don't always match the options prefixes: I'll think of a better way to present these completions. |
8b8667c to
42d6e84
Compare
|
Should be better now, and added more sed implementations. |
To spare parsing yaml output in zsh code, these completers rely on yq to parse the xkbcli output. If yq is not installed, the completion will fallback to a more rudimentary version using only sed for parsing.
42d6e84 to
e3651a0
Compare
|
@wismill any thoughts? |
N.B. To try it out place the completion script called "_xkbcli" somewhere in your
$fpath.Please check that the meson bits are reasonable.