I’ve added a bind command to my .kshrc so I can use TAB for filename
completion. The relevant lines are:
if test “$TTY” != “not a tty”; then bind ‘^I’=complete; fi
It works fine when opening a new Pterm window (tty = “/dev/ttyp*”), and when
running make from PhAB (“not a tty”).
However, under some circumstances, it issues the error:
/bin/sh: /home/pscarter/.kshrc: bind: cannot bind, not a tty.
sh is actually a symlink to ksh. The error occurs when running a shell
script in a pterm ("/dev/ttyp*"), when running make from a pterm
("/dev/ttyp*"), and when running a shell script in text mode ("/dev/con*")
How can I properly check if .kshrc is being run as a script rather than a
Neil Carter Psychology Department
IT Technician University of Wales Swansea
Wales, United Kingdom