Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Writing Your Own Simple Tab-Completions for Bash and Zsh (mill-build.org)
4 points by lihaoyi 6 months ago | hide | past | favorite | 1 comment


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. :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: