Function which overrides bash command

You should use the builtin command:

pushd(){
   if [ $# -eq 0 ]; then
      builtin pushd .
   else
      builtin pushd "$@"
   fi
}