diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-28 11:26:10 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-28 11:26:10 +1200 |
commit | a1eb4a630630ff412530ebc4bf6adbd977d94702 (patch) | |
tree | f9092db00b5fb4816c950c1045e7cc1d5813a6a5 | |
parent | Use -C to change directory in :make call (diff) | |
download | vim-make-target-a1eb4a630630ff412530ebc4bf6adbd977d94702.tar.gz vim-make-target-a1eb4a630630ff412530ebc4bf6adbd977d94702.zip |
Escape target if supported
-rw-r--r-- | autoload/make/target.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/make/target.vim b/autoload/make/target.vim index 6e86d44..1f16801 100644 --- a/autoload/make/target.vim +++ b/autoload/make/target.vim @@ -24,8 +24,11 @@ function! make#target#Make() abort endfor - " If we found targets, :make them + " If we found targets, :make them; escape them if we can for l:target in l:targets + if exists('*shellescape') + let l:target = shellescape(l:target) + endif execute 'make! -C %:p:h '.l:target endfor |