3 ms·
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 sh
by verdverm 5y ago
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
- mschrage 5y agoWe'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. [0] https://github.com/withfig/oclif-plugin https://github.com/withfig/oclif-plugin
- verdverm 5y agoDoes 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)