I want to be able to use the arrow keys when i pipe output from a php cli script into less. At the moment php cli does something to the tty which can only be fixed when you execute
!stty sane
from within less, which is a right pain!
I found a reference to this problem @ http://www.php.net/manual/en/features.commandline.php#90743 but i can’t seem to find an answer 🙂
Any help is appreciated, although this problem ranks far below many other problems 😉
I’ve been searching for some tweakable to do exactly this. Right now my best workaround is:
which has the desired effect, but is a pita to have to type. It seems that when the PHP CLI detects stdin is a tty, it puts that tty into linemode.