clearlinux / clr-installer

Clear Linux* OS Installer
GNU General Public License v3.0
92 stars 42 forks source link

Bash and/or zsh auto-completion script for command line installer #711

Closed karthikprabhuvinod closed 4 years ago

karthikprabhuvinod commented 4 years ago

Is your feature request related to a problem? Please describe. Currently there is no tab-completion or auto-complete feature in bash or zsh for clr-installer

Describe the solution you'd like It will nice if we auto-complete for options in bash and/or zsh. Makes the CLi installer more user-friendly.

Describe alternatives you've considered Currently the best way around this to print clr-installer --help or clr-installer docs

mdhorn commented 4 years ago

Most of our user use the GUI, then a small percentage use the TUI. Command-line completion is really only useful for the developers, hence it was never prioritized. 😉

lebensterben commented 4 years ago

Hey I've written one last year. But I forget to publish it....

lebensterben commented 4 years ago

@karthikprabhuvinod It's kind of completed as of last year. But I haven't thoroughly test it. https://github.com/lebensterben/clr-installer/tree/completions/completions

lebensterben commented 4 years ago

Actually I invented some tricks using invisible unicode symbols to display block device for bash. (Though it's only for display you can not actually use tab-completion).

karthikprabhuvinod commented 4 years ago

@lebensterben pretty cool.. Do you not wish to upstream this?

lebensterben commented 4 years ago

@lebensterben pretty cool.. Do you not wish to upstream this?

I need to update this first and test it.

lebensterben commented 4 years ago

@karthikprabhuvinod Just to give you a quick update on my progress. I was updating my shell completions for swupd-client and clr-boot-manager in the last week. Well it took longer than I thought due to a major upgrade in swupd-client. I will focus on the clr-installer in the next few days. zsh part is done, and I've tested it before. I just need to update it. For bash, I'm still writing it. I will not use any tricks I mentioned before, because I found that it might be hard for other maintainers to understand what I'm doing. So I will just stick to conventions.

karthikprabhuvinod commented 4 years ago

@lebensterben thanks for updating us 😊. That's fine. Will be happy to review your code whenever you can submit.

mdhorn commented 4 years ago

Fixed in clr-installer 2.6.1, Clear Linux OS 33300 or higher.