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

Add ZSH completion #637

Merged
merged 2 commits into from
May 28, 2022
Merged

Conversation

VorpalBlade
Copy link
Contributor

@VorpalBlade VorpalBlade commented May 20, 2022

This is mostly a write of zsh completion from scratch, only partly based on the code in #39 (comment). I couldn't reuse most of it since it didn't follow zsh style guideline (use lower case in the help messages) and was also outdated and missing several options.

I believe these completions should be accurate as of 1.5.0 (latest version and latest commit as of writing this).

@VorpalBlade
Copy link
Contributor Author

One thing I'm not completing (and nor is the bash completion, so I don't consider this a big issue) is config parameter override on the command line.

This could be done, though I prefer to have a hidden command to tlp that lists valid variable names rather than hard coding the list of these in both the zsh and bash completion (and possibly fish completion in the future if someone wants to write that). Completing arguments to those config flags would be more difficult though.

@linrunner
Copy link
Owner

Hi,

this is really great, 9 years after #39. Give me a little time to examine.

@linrunner
Copy link
Owner

Solves #39

@linrunner linrunner self-assigned this May 24, 2022
completion/zsh/_tlp Outdated Show resolved Hide resolved
completion/zsh/_tlp-run-on Outdated Show resolved Hide resolved
completion/zsh/_tlp-rdw Outdated Show resolved Hide resolved
completion/zsh/_tlp-radio-device Outdated Show resolved Hide resolved
@linrunner
Copy link
Owner

Well, this already looks very promising. Please iron out the small problems (see comments).

@linrunner
Copy link
Owner

ps. config parameter override is actually intended as a test tool and not for users. A completion would be great, of course, but I'm also very happy with your contribution without that.

@VorpalBlade
Copy link
Contributor Author

I believe those issues should be fixed now.

@linrunner linrunner merged commit bfc789b into linrunner:main May 28, 2022
@linrunner
Copy link
Owner

Right. Thank you very much for your contribution.

As I have no experience with the zsh, I would be grateful if you could stay tuned in case of issues.

@VorpalBlade
Copy link
Contributor Author

Not a problem, I tag me in any relevant issues and I should be able to respond (though it may take a few days, or weeks later during the summer, when I will be on a completely offline vacation with a backpack and tent).

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

Successfully merging this pull request may close these issues.

None yet

2 participants