On Friday, July 1, 2016 at 10:38:43 PM UTC+12, Ni Va wrote:
 
> command! -nargs=+ OutSay      :let g:out=system("".<q-args>) | enew | 
> put=g:out
> 
> It works well but I need to pass $vim value as args of command in order to 
> execute this :
> 
> OutSay 7z a Vim.7z $vim

If I set $vim in bash before starting vim, say
$ export vim=~/test

Then 
OutSay 7z a Vim.7z $vim
works for me, in that 7z runs and compresses ~/test into Vim.7z.  

"$vim" looks unusual for an environment variable, don't you mean "$VIM"?  Case 
is significant in environment variable names, on unix and Linux anyway, not 
sure about windows and Mac OS.

If I run

 OutSay 7z a Vim.7z $VIM

I get 1613 more lines, and Vim.7z is created, about 5 MiB.

Regards, John Little




-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to