3 ms·
Writing Your Own Simple Tab-Completions for Bash and Zsh
- cb321 1y agoFor 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 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. :-)