-
Notifications
You must be signed in to change notification settings - Fork 62
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
Tab completion for commands, sub-commands and options #1690
Comments
is that not mainly a shell issue?
feel free to submit bash_completions…
|
As @ondohotola said, feel free to submit bash_completions! And you don't have to start from scratch! Perhaps, you can build on xsv's bash completion as qsv shares its docopt CLI parser. https://github.com/jqnatividad/docopt.rs?tab=readme-ov-file#tab-completion-support |
Sorry, I didn't make this clear in the first message, but I wrote this from the point of view of a user, not a developer. I have no clue how to follow your suggestions. Moreover, I don't use bash interactively, only fish. Fish can generate completions automatically in one command, but does it by parsing a
All I know is that Tab completion is great for discoverability, so this suggestion seems to fit well the stated goal of being "As Easy to Use as Possible" (quoting the README). I understand that given limited time, other features probably need more attention, so no worries. And sorry I can't offer to contribute (I will try, if I ever take time to figure this out). |
Thanks for clarifying @Guillawme . Using docopt, and remaining with it with our own qsv specific fork was a "considered" decision - #463, so I doubt I'll ever create man pages unless somebody from the community decides to do so. What we are doing is working on qsv-pro - which aims to make it much easier to leverage the power of qsv - going beyond tab completions (which, is still only a small subset of Data Analysts - folks who are comfortable with a command line interface) to something that ANYBODY can use. The spreadsheet interface will allow you to load a CSV/spreadsheet, even a very large one that regular spreadsheet software cannot load - apply qsv operations to it; run recipes (that you can download from a recipe library, and you can even create, modify and share your recipes - recipes can be written with Luau or Python); work with different cloud providers, etc. Recipes should make it easier to use qsv, but we're also experimenting with a natural language interface which will write the qsv command for you based on a natural language request. I touched on it in a recent presentation I gave at the Mar 2024 CKAN Monthly Live and we'll dive into it a bit more at csvconf.com. Time allowing, I may get around to enabling tab completion, starting with bash first by renovating the existing docopt-wordlist-bash code. Hopefully, some other member of the community contributes fish shell integration. |
#1307 may be relevant for similar implementations. |
Thanks @rzmk for your Bashly implementation. Hopefully, that is but the first tab completion contribution... |
Is your feature request related to a problem? Please describe.
I can't get tab completion for
qsv
commands, sub-commands and options, while I can get them when usingxsv
(unfortunately no longer maintained). The shell I use, fish, can automatically generate completions fromman
pages, butqsv
doesn't have aman
page.Describe the solution you'd like
Tab completion that works in the fish shell for
qsv
commands, sub-commands and options, regardless of how this is implemented (an exhaustiveman
page that fish can parse would be sufficient, and would also improve the documentation; but any other mechanism would be fine too).Describe alternatives you've considered
I use
xsv
interactively to get tab completions, andqsv
in scripts once I have interactively figured out the command I need. But this only works for the set of commands present in both programs.The text was updated successfully, but these errors were encountered: