Writing Your Own Simple Tab-Completions for Bash and Zsh

4 lihaoyi 1 8/7/2025, 5:17:22 AM mill-build.org ↗

Comments (1)

cb321 · 16h 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. :-)