Use precmd function array instead of simply overwrite precmd