quote $(tty) in case it contains spaces ("not a tty")