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

zsh and bash completion #1864

Closed
teto opened this issue Aug 24, 2023 · 5 comments · Fixed by #2452, #2456, #2461 or #2460
Closed

zsh and bash completion #1864

teto opened this issue Aug 24, 2023 · 5 comments · Fixed by #2452, #2456, #2461 or #2460
Labels
enhancement New feature or request
Milestone

Comments

@teto
Copy link
Contributor

teto commented Aug 24, 2023

Problem to solve

I would like to have zsh and bash completion. Maybe it's already possible and they are not installed by my linux distribution but I had a quick look on this repo and was not sure if this is possible ?

@teto teto added the enhancement New feature or request label Aug 24, 2023
@fabricereix
Copy link
Collaborator

We haven't created a completion file yet.
It will be indeed interesting to have one.
Similar to the vim syntax file, we could provide it in contrib/ folder.
In the long term, it should be packaged with Hurl (in the same package).

@teto
Copy link
Contributor Author

teto commented Aug 31, 2023

not sure what argument parsing library you use but usually these libraries can generate the completion out of the box with something like hurl --zsh-completion > _zsh . Might be worth checking out, if hurl uses something like clap for instance

@mawkler
Copy link

mawkler commented Jan 26, 2024

It surprised me that hurl doesn't support completion. As a reference, here's how mullvad-vpn's CLI creates its shell completions using the crate clap_complete.

@fabricereix
Copy link
Collaborator

I would tend to prefer compile-time completion rather than runtime-completion.
We are going to look at it, to see whether to use clap or using simple Python scripts from our option files https://github.com/Orange-OpenSource/hurl/tree/master/docs/spec/options/hurl

@jcamiel
Copy link
Collaborator

jcamiel commented Jan 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment