Hi Bram, On Sun, Jun 9, 2019 at 9:05 AM Bram Moolenaar <[email protected]> wrote: > > Yegappan wrote: > > > The expand() function can be used to expand special characters. If the > > special characters appears anywhere in the command string, then this > > cannot be used. > > > > Vim supports expanding special characters anywhere in a command string > > for internal commands. For example, the 'makeprg' option accepts a command > > string where special characters can occur anywhere in the string. > > But a Vim plugin cannot support this. So plugins like dispatch.vim use a > > complicated > > function to expand the special characters (look at the dispatch#expand() > > function in > > https://github.com/tpope/vim-dispatch/blob/master/autoload/dispatch.vim). > > > > This patch adds a expandcmd() function that can be used to expand all the > > special characters in a command string. > > Thanks. I updated the docs to mention that the expansion happens like > for the ":edit" command. Other commands, such as ":next" work slightly > differently. >
Thanks for merging the patch. Hopefully this is sufficient for plugins to expand options like 'makeprg', 'grepprg', 'equalprg', 'formatprg', 'keywordprg', etc. > > I also reported the error, when there is one. There is still the case > it returns with an error, but without an error message. Perhaps we > should also fail then with some generic message? > Are you referring to the case where expand_filename() returns an empty error message string? 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/CAAW7x7mJS8UPxNtJC1sm0m2cKfxGjv_S%3DG3y8exinb8-N9RpbA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
