Can it complete subcommands? By the way, there's a small syntax error in the readme example: []string{"work", "dring}
On Tuesday, May 23, 2017 at 12:21:07 PM UTC-7, Eyal Posener wrote: > > I recently did the complete package <https://github.com/posener/complete>, > that enables bash completion for the go command line. > I came to be really satisfied with the result, but the package downside is > that the completion can be inconsistent with the actual flags provided by > the program. > I thought how is it possible to add support to the standard library flag > package for automatic bash completion, more or less in the same way. > (Including installation, and that the program binary will provide bash > completion for itself) > > Here is what I came out with: https://github.com/posener/flag. > > It is 100% interchangeable with the standard library flag package. > The implementation is also interesting, I only add to make > 'flat.Flag.Value' implement an interface I called 'Completer'. All the > standard library flags, which do not implement this interface don't > complete anything (which is fine) and additional flag types can complete > all sort of stuff. > > Please let me know your opinion about it. > > Cheers, > Eyal > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.