Loading ...
Sorry, an error occurred while loading the content.

Re: editing the output of a shell cmd

Expand Messages
  • Benji Fisher
    ... Perhaps I misunderstood what Moshe wanted. I assume when he tried :edit !ls he wanted (if the directory contained files foo.txt and bar.txt) to edit the
    Message 1 of 10 , Aug 29, 2002
    • 0 Attachment
      Michael Naumann wrote:
      >
      > 29.08.2002 04:04:35, Benji Fisher <benji@...> wrote:
      >
      > >Moshe Kaminsky wrote:
      > >>
      > >> Hi,
      > >>
      > >> Is there a reason I can't edit the output of a shell command, like with
      > >> read and write?. I mean, eg,
      > >> :edit !ls
      > >> doesn't work. Also I tried
      > >> :edit +read\ !ls
      > >> this doesn't work, I don't see why (it says `Can't open file !ls')
      > >
      > > Did you try
      > >
      > >:execute "edit" system("ls")
      >
      > Benji,
      >
      > What's this supposed to do?
      > I think this will almost always only produce a vim error-message, stating that
      > :edit only accepts one filename.
      > Either way, it does not put the output into a buffer, like Moshe wanted.

      Perhaps I misunderstood what Moshe wanted. I assume when he tried ":edit
      !ls" he wanted (if the directory contained files foo.txt and bar.txt) to edit
      the files foo.txt and bar.txt . Maybe I should have suggested "args" or
      "argadd" instead of "edit".

      --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.