Using scripts in any language for Bash/Zsh tab completion
Saverio Miroddi explains how to write tab-completion scripts in any language, with an example in Ruby, and how to use them in both Bash and Zsh. As is common with well-received blog posts, it even inspired some open source (for making tab completion scripts trivial).