Description
We have bash completion for Wasp thanks to @thvu11 !
In order to install it, user needs to run wasp completion to read the instructions and then run a couple of commands, which includes making decisions (decisions are hard!) like where to put the generated completion script.
There are two points here:
- How will they know that bash completion exists and that they need to run
wasp completion? - Can we make installation of bash completion easier, so they don't have to be making any decisions and it is as little steps as possible?
For discoverability, the easiest thing would be to add something to documentation (https://github.com/wasp-lang/wasp/tree/master/web/docs) -> we should certainly do that. We might also want to add info about completion command to the help that is printed when you type just wasp in terminal.
Next, we might want to inform users about this during the installation, in install script (https://github.com/wasp-lang/get-wasp/blob/master/installer.sh) -> something like "We have support for bash completion, run wasp completion to learn more!". Or, we could even add step to install script that asks: do you want us to install bash completion for you? Y/N? and if Y we do it automatically.
Making installation simpler -> I think one big step would be telling users where to put the completion script. For me personally it was not easy to figure out where to put it. We could at least recommend them some paths. Next step would be for us to make that decision -> we could maybe put the script at the same place where we install wasp stuff (binary, data)?
Also, we could even add that source ... line to the bash_profile/rc! I know some tools like nvm and ruby add stuff like that on their own.
We have seen netlify doing some nice things with their CLI, so it would probably be smart to again check how they do these things and maybe do it same as them, if we like what they do.