aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-13 22:29:23 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-13 22:29:23 +1300
commit9e6c1a55d4b00aa114393024421b564f56b7336d (patch)
tree8c6ee99709c478a3534dfb7ee5d4bfb688b5511c
parentac8d360e59896c11816f6a1edaaed647f71f6796 (diff)
parent9a0d3b1514f1fb8620726bf08f6e574566d6bcde (diff)
downloaddotfiles-9e6c1a55d4b00aa114393024421b564f56b7336d.tar.gz
Merge branch 'feature/vim-plug' into develop
* feature/vim-plug: Check for shellescape() function before using it
-rw-r--r--vim/plugin/auto_backupdir.vim14
-rw-r--r--vim/plugin/auto_swapdir.vim14
-rw-r--r--vim/plugin/auto_undodir.vim14
3 files changed, 24 insertions, 18 deletions
diff --git a/vim/plugin/auto_backupdir.vim b/vim/plugin/auto_backupdir.vim
index 6f5aca97..17a1a646 100644
--- a/vim/plugin/auto_backupdir.vim
+++ b/vim/plugin/auto_backupdir.vim
@@ -32,12 +32,14 @@ if !isdirectory(expand(s:backupdir))
" 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:backupdir))
- elseif has('win32') || has('win64')
- silent! execute '!mkdir '
- \ . shellescape(expand(s:backupdir))
+ elseif has('*shellescape')
+ if has('unix')
+ silent! execute '!mkdir -m 0700 -p '
+ \ . shellescape(expand(s:backupdir))
+ elseif has('win32') || has('win64')
+ silent! execute '!mkdir '
+ \ . shellescape(expand(s:backupdir))
+ endif
endif
endif
diff --git a/vim/plugin/auto_swapdir.vim b/vim/plugin/auto_swapdir.vim
index 4fa209c1..7d5940aa 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
diff --git a/vim/plugin/auto_undodir.vim b/vim/plugin/auto_undodir.vim
index 8e81fde6..0cd54cd0 100644
--- a/vim/plugin/auto_undodir.vim
+++ b/vim/plugin/auto_undodir.vim
@@ -35,12 +35,14 @@ if !isdirectory(expand(s:undodir))
" 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:undodir))
- elseif has('win32') || has('win64')
- silent! execute '!mkdir '
- \ . shellescape(expand(s:undodir))
+ elseif has('*shellescape')
+ elseif has('unix')
+ silent! execute '!mkdir -m 0700 -p '
+ \ . shellescape(expand(s:undodir))
+ elseif has('win32') || has('win64')
+ silent! execute '!mkdir '
+ \ . shellescape(expand(s:undodir))
+ endif
endif
endif