From bef91c6c585240031268e3de8c1b684fce8927df Mon Sep 17 00:00:00 2001 From: Daniel Moch Date: Sun, 4 Dec 2016 20:21:42 -0500 Subject: [PATCH] Properly expand special characters in makeprg Closes #7 --- plugin/makejob.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/makejob.vim b/plugin/makejob.vim index eeefbde..5aa4732 100644 --- a/plugin/makejob.vim +++ b/plugin/makejob.vim @@ -85,8 +85,18 @@ function! s:CreateMakeJobWindow(prog) return bufnum endfunction +function! s:Expand(input) + let split_input = split(a:input) + let expanded_input = [] + for token in split_input + let expanded_input += [expand(token)] + endfor + return join(expanded_input) +endfunction + function! s:MakeJob(grep, lmake, grepadd, bang, ...) let make = a:grep ? &grepprg : &makeprg + let make = s:Expand(make) let prog = split(make)[0] let internal_grep = make ==# 'internal' ? 1 : 0 execute 'let openbufnr = bufnr("^'.prog.'$")'