From c22187831e9ad8bf448f7f79ff0a1c713f9c5326 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 10 Mar 2025 20:04:40 +0900 Subject: [PATCH] Use noshellslash only on win32 --- autoload/gopher/system.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autoload/gopher/system.vim b/autoload/gopher/system.vim index 1308fe0a..74a301cc 100644 --- a/autoload/gopher/system.vim +++ b/autoload/gopher/system.vim @@ -370,13 +370,17 @@ endfun " Join a list of commands to a string, escaping any shell meta characters. fun! gopher#system#join(l, ...) abort try - let l:save = &shellslash - set noshellslash + if has("win32") + let l:save = &shellslash + set noshellslash + endif let l:l = filter(copy(a:l), {_, v -> v isnot v:null }) return join(map(l:l, {_, v -> shellescape(l:v, a:0 > 0 ? a:1 : '') }), ' ') finally - let &shellslash = l:save + if has("win32") + let &shellslash = l:save + endif endtry endfun