Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Working on generating zsh tab autocompletion for my CLI framework. I'm finding it difficult because zsh makes completion surprisingly complicated and the zsh docs have a lot more descriptions than examples. Other CLI frameworks all seem to approach this differently.


Skimming through this guide: https://dolthub.com/blog/2021-11-15-zsh-completions-with-sub... it seems to be a lot more convoluted than I thought. Really, every external CLI binary that supports completions has this autocomplete script?

I thought zsh parsed man pages to get available options/subcommands.


It seems like they all have DIFFERENT autocomplete scripts, some of which subshell out to the tool being completed to generate further completions.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: