Just like most developers, I live in the terminal, I savor the ability of automation and the boundless things I can do with it.
Before I start, I want to briefly remark on my setup;
I used to use
bash and know the best as my default shell, but I solely switched to
zsh because it become the default in macOS, likewise I use ohmyzsh as my framework. It is a pleasant experience and easy to manage the prompt and plugins.
This is a preview of the autocomplete feature in Fig, the tool taplo is what I wrote the completion spec for.
While it required some brainstorming and a bit of research, it was a smooth experience to contribute to this project, and I learned a lot. First, I followed their documentation on writing a completion spec, which is well written, and learned a lot about the basic CLI terminology (i.e.
argument). Corresponding to what tool you choose to write the completion spec for, you need to learn a bit about the tool itself, which is cool because you get to know the tool better.
I tackled the issue missing spec for taplo #1532.
Taplo is a CLI tool for working with TOML files, and it includes features like linting, formatting, and validation. I honestly didn't know much about TOML before I started working on this, but I learned a lot about both the tool and TOML itself.
Some CLI tools have
man pages and in such situations like writing completion spec, people usually use them as a source to learn about the tool and its subcommands options, etc. (Usually they have the best reputation for being the most accurate source of information). Though, the tool I chose to write the completion spec,
taplo, did not have any manual entry pages. Even better! I found their website and documentation which was really helpful.
Maintainers of withfig/autocomplete are super active and helpful. They constantly add more issues related to writing brand-new completion specs and improving existing ones. Writing completion specs, I think, is one of the best gateways to learning about CLI tools in depth and contributing to open-source. Also, if you are using Fig you can actually use the completion specs you wrote in your terminal!