genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
20 stars 17 forks source link

add bash completion #37

Closed jschlatow closed 1 year ago

jschlatow commented 1 year ago

@ssumpf, @nfeske I just pushed a first version of a bash-completion script for Goa to staging. If you're keen on trying it out, I'll be interested in your feedback.

nfeske commented 1 year ago

@jschlatow thanks a lot for picking up this idea. I'm quite surprised how succinct such a script can be.

During my test, completion of the basic commands works well. However, my attempts to get the various options (like --arch) listed (e.g., doing goa build <tab><tab>) did not succeed so far. I see that the completion script covers them, but do I need to take another precaution than sourcing the completion script from my .bashrc?

jschlatow commented 1 year ago

@nfeske thanks for your feedback. I just pushed a fixup commit.

nfeske commented 1 year ago

goa update-goa <tab> is very nice!

nfeske commented 1 year ago

I just pushed a fixup commit.

That was quick. Now it works. :-) Only I found the --arch option absent from the goa build completion.

Curiously, when typing out goa build --arch <tab>, it actually shows the available architectures - very nice. When trying x<tab>, however, the argument is not completed to x86_64 automatically.

That minor nitpicks aside, the current state improves the user experience of Goa quite significantly already.

jschlatow commented 1 year ago

@nfeske I must have deleted the --arch option by accident at some point. I pushed another fixup, which also addresses a few more issues.

nfeske commented 1 year ago

Excellent! It works like a charm now.

jschlatow commented 1 year ago

Fixed by ddfceb6.