diff options
Diffstat (limited to 'vim/plugin/auto_swapdir.vim')
-rw-r--r-- | vim/plugin/auto_swapdir.vim | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/vim/plugin/auto_swapdir.vim b/vim/plugin/auto_swapdir.vim index b5f9ce3a..52ccbf11 100644 --- a/vim/plugin/auto_swapdir.vim +++ b/vim/plugin/auto_swapdir.vim @@ -32,12 +32,14 @@ if !isdirectory(expand(s:swapdir)) " Failing that, use an OS-dependent command " (Fortunately, Unix and Windows are the only OS types in the world) - elseif has('unix') - silent! execute '!mkdir -m 0700 -p ' - \ . shellescape(expand(s:swapdir)) - elseif has('win32') || has('win64') - silent! execute '!mkdir ' - \ . shellescape(expand(s:swapdir)) + elseif has('*shellescape') + if has('unix') + silent! execute '!mkdir -m 0700 -p ' + \ . shellescape(expand(s:swapdir)) + elseif has('win32') || has('win64') + silent! execute '!mkdir ' + \ . shellescape(expand(s:swapdir)) + endif endif endif |