Now only prints prompt if connected to a tty