Changed zsh snippet for function

I feel better this is it more common in zsh.