Update history.sh to support cd history