Zsh style preexec and precmd functions for Bash.