dotfiles/bin/is-tty

10 lines
74 B
Bash
Executable File

#!/bin/sh
case $(tty) in /dev/tty[0-9]*)
exit 0
;;
*)
exit 1
;;
esac