zsh: replace mem with res