Odd vi response when input redirected
Ray Swartz
ray at saturn.ucsc.edu
Mon Aug 7 23:57:04 AEST 1989
On System V machines, the command
cat | vi
works fine. [On BSD systems, vi gives an error message and won't work properly]
The benefit of redirecting the input of vi is that you can put your own
process in place of cat and implement a "hot key" function for vi. On my
system, the hot key (a ctrl-A) displays a vi help menu for novice users.
The hot key works great. The problem is that now the shell escape doesn't
work properly. When I enter :!cmd, the command appears to be run, but the
output doesn't go the the terminal. For example, :!ls produces no output.
This seems like odd behaviour since only the input of vi has been redirected.
Where does the output of the !cmds go? BTW, I tried !cmd > /dev/tty
but that didn't do anything either.
Thanks in advance.
Ray Swartz
I've noticed an odd vi feature and don't know why it reacts the way it does.
More information about the Comp.unix.questions
mailing list