Saturday, July 30, 2011

Re: Assign the result of a COMMAND to a variable

Hi Axel!

On Fr, 29 Jul 2011, Axel Bender wrote:

> I wonder if it is possible to assign the result of a command to a variable
> like so (not working):
>
> let [var] = [command]
>
> (where [command] stands for an arbitrary command producing output, like e.g.
> ls].

System command or Vim command (Unfortunately, ls could be both)? For the
latter, ZyX has already answered, for the first, you can use the
system() function.

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: