zsh: Add extract() function