wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.24k stars 1.18k forks source link

Make bash completion easier to discover and install #256

Open Martinsos opened 3 years ago

Martinsos commented 3 years ago

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:

  1. How will they know that bash completion exists and that they need to run wasp completion?
  2. 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.

Martinsos commented 1 year ago

NOTE: installer is now in separate repo: https://github.com/wasp-lang/get-wasp .

h4r1337 commented 1 year ago

I think I can work on this one.

Martinsos commented 1 year ago

I think I can work on this one.

That would be awesome, pls go for it!

Martinsos commented 1 year ago

I also just created this connected issue: https://github.com/wasp-lang/wasp/issues/754 .

Martinsos commented 1 year ago

We added mention of completion to the help of Wasp CLI.