Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal
by verdverm on Tuesday May 25, 2021 @12:52PM
(#27279219)
Many CLI libraries provide the ability to generate auto-completion scripts. Cobra for Golang is an excellent example. It provides functions for all the major shells and is quite simple to add to any Go CLI using the library. It also supports dynamic calls for when someone wants to autocomplete on a resource known only to the running CLI.
For python argparse, there is argcomplete in the same vein
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal
by mschrage on Tuesday May 25, 2021 @01:20PM
(#27279593)
We're building out integrations with CLI libraries like cobra and oclif[0], so you can generate a Fig completion spec automatically the same way!
Then it just comes down to the Fig popover UX.
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal
by verdverm on Tuesday May 25, 2021 @05:04PM
(#27282640)
Does Fig then need to mirror autocomplete for any command which wants to make use of the popover UX?
(one of the reasons I would not want this tool, colors and file extensions are sufficient for types, no need for icons, popups, and yet another tool)
The reason we created our own standard is because traditional shell autocomplete doesn't always provide metadata, like descriptions, priority or icons. Also it is a little tricky to write by hand, unless you're pretty familiar with shell scripting.