4 ms·
This is something we definitely should add as a fallback when a Fig completion spec doesn't exist! The reason we created our own standard is because traditiona
by mschrage 5y ago
This is something we definitely should add as a fallback when a Fig completion spec doesn't exist!
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.
- verdverm 5y agoMany 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)