←back to thread

634 points david927 | 2 comments | | HN request time: 0.538s | source

What are you working on? Any new ideas that you're thinking about?
Show context
bbkane ◴[] No.41343130[source]
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.
replies(1): >>41343298 #
1. ivanjermakov ◴[] No.41343298[source]
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.

replies(1): >>41343349 #
2. bbkane ◴[] No.41343349[source]
It seems like they all have DIFFERENT autocomplete scripts, some of which subshell out to the tool being completed to generate further completions.