cb321 2 days ago

For simple commands, it is pretty easy if your CLI toolkit sticks to a _gnu_generic kind of format, but for subcommands it gets hard.

Since in cligen (https://news.ycombinator.com/item?id=44820383) the "proc signature is already The Spec", it actually provides a multi-command/subcommand completion script generator in util/complgen.nim .

Bash/Fish logic would be nice if anyone wants to contribute after reading this article about it. :-)