diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | autoload/shebang_create_exec.vim | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -1 +1 @@ -1.0.0 +1.0.1 diff --git a/autoload/shebang_create_exec.vim b/autoload/shebang_create_exec.vim index 1ce68e3..60d2276 100644 --- a/autoload/shebang_create_exec.vim +++ b/autoload/shebang_create_exec.vim @@ -70,10 +70,10 @@ function! s:MakeExecutable(filename) abort else " We'll need to fork to chmod(1); escape the filename safely, using - " shellescape() if we've got it - let l:filename_escaped = exists('*shellescape') + " shellescape() if we've got it, or manual UNIX sh quoting if not + let filename_escaped = exists('*shellescape') \ ? shellescape(filename) - \ : '''' . escape(filename, '''') . '''' + \ : "'" . substitute(filename, "'", "'\\''", 'g') . "'" " Try to make the file executable with a fork to chmod(1) call system('chmod +x '.filename_escaped) |