First try to make eshell respect remote server and rails console's
command history