zsh: add timeout to local function