zsh: separate local function into units