Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!purdue!decwrl!shelby!agate!saturn!ray From: ray@saturn.ucsc.edu (Ray Swartz) Newsgroups: comp.unix.questions Subject: Odd vi response when input redirected Summary: cat | vi causes :!cmd output to be lost Keywords: vi, !cmd Message-ID: <8649@saturn.ucsc.edu> Date: 7 Aug 89 13:57:04 GMT Reply-To: ray@saturn.ucsc.edu (Ray Swartz) Organization: University of California, Santa Cruz Lines: 23 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.