diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 01:28:46 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 01:28:46 +1200 |
commit | 7af26cb8b9b4de215d9c03a5454575d7f1ae01aa (patch) | |
tree | ebc82c115efdee451f824d9bca06a17491be33f6 | |
parent | Merge branch 'release/v1.0.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-shebang-create-exec-1.0.1.tar.gz (sig) vim-shebang-create-exec-1.0.1.zip |
Merge branch 'hotfix/v1.0.1'v1.0.1
* hotfix/v1.0.1:
Correct manual UNIX shellescape() implementation
Improve clarity of comment
Remove unneeded variable scoping
-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) |