I’ve had to write a couple of completion scripts for zsh over the last couple of months. I write such scripts rarely enough that I seem to have forgotten how to do it every time I set out to write a new one. So this time I decided to write down a few notes so I don’t have to look through the documentation too much next time.