fix prompt command tty detection