From 87d3f265bc4bcedec146a4da7bb83244cea9fa6b Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 30 Apr 2018 16:48:32 +0200 Subject: [PATCH] health#provider: fix logic with s:shellify It should be quoted if there is any character that needs escaping, but not if there is a character that does not need escaping. --- runtime/autoload/health/provider.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 4adab1aa76..adde784c2a 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -51,7 +51,7 @@ function! s:shellify(cmd) abort return a:cmd endif return join(map(copy(a:cmd), - \'v:val =~# ''\m[\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ') + \'v:val =~# ''\m[^\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ') endfunction " Run a system command and timeout after 30 seconds.