make precmd work on Mac OS