gardenlinux / builder

Builder used to construct Garden Linux. Re-usable for other OS-projects.
Apache License 2.0
8 stars 1 forks source link

Shell completion script for the builder #56

Open fwilhe opened 7 months ago

fwilhe commented 7 months ago

What would you like to be added:

It would be great if the builder had completion, reading out the actual available features in the current image being built.

For example in GL it should be like

./build k[tab][tab]
kvm

cf: https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial

Why is this needed:

Developer experience would be better, both for seasoned contributors and for newcomers.

Akendo commented 3 months ago

Thanks for pointing me towards here. In general, I do not use shell. Instead, I would use complgen. I might take a look at this week.

Akendo commented 3 months ago

I've taken some time to understand a bit more how we're building our product and derived some more ideas to build up the completion. This works for fish more well now:

Image

Akendo commented 3 months ago

I'm currently unable to perform proper subword matches after defined the platform. I've created an issue with the project , but I might do something wrong here. If this is not going to get address until EOW, we might close this down and move on to more important tasks.

Akendo commented 3 months ago

The problem was resolved. Thanks to @nkraetzschmar for pointing to my error. We have now a working MVP for bash.