Hi Andy,

On Mon, Aug 5, 2019 at 11:53 AM 'Andy Wokula' via vim_dev
<[email protected]> wrote:
>
> Am 09.06.2019 um 17:22 schrieb Bram Moolenaar:
> > Patch 8.1.1510
> > Problem:    A plugin cannot easily expand a command like done internally.
> > Solution:   Add the expandcmd() function. (Yegappan Lakshmanan, closes 
> > #4514)
> > Files:            runtime/doc/eval.txt, runtime/doc/usr_41.txt, 
> > src/evalfunc.c,
> >              src/testdir/test_expand.vim
>
> "cannot easily" is not true I think:
>
>
> func! ExpandCmd(args)
>      exec 'NwoExpand '. a:args
> endfunc
>
> " Internal:
> com! -nargs=? -complete=file NwoExpand return <q-args>
>
>
> "cannot nicely" may hit it better because of the internal command.
> This side effect of file completion was undocumented.
> Works for Vim 7.0.
>
> Not sure if it really does the same as expandcmd().
>

Your solution is similar to the expand() function used by the dispatch
plugin 
(https://github.com/tpope/vim-dispatch/blob/master/autoload/dispatch.vim).
Your solution is simpler than the one used by the dispatch plugin.
But the Vim plugins have to use this as a workaround to expand the
wildcards anywhere in the command-line instead of a native solution.

Regards,
Yegappan

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7n1e%3DMRP1QQPkt5QN4-NcrKDPdUTDrJdWT7yFxHEwQ4Ow%40mail.gmail.com.

Raspunde prin e-mail lui