Re: OT: xargs & vi
On Wed, 9 Jan 2002 22:11:56 +0100, martin f krafft <madduck@madduck.net> wrote:
[snip]
> any form of 'vim -' will read the data to be edited from stdin, not the
> filenames, so it's not appropriate.
>
> and even though i swear it worked,
>
> command | vim
>
> just dies with
>
> Vim: Warning: Input is not from a terminal
> Vim: Error reading input, exiting...
> Vim: Finished.
Look. Vim, or any other text based program needs to "talk" to the
terminal. If you put it at the end of a pipe, the program is essentially
run in the background without access to the terminal. Vim sees that,
and quits. It's the sensible thing to do. So, don't invoke it that way.
$ vim $(subshell program returning a list of filenames)
--
Eric G. Miller <egm2@jps.net>
Reply to: