From 3085eabaa3da37a638bb06771396845e6efd35be Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 01:26:19 +1200 Subject: Remove unneeded variable scoping --- autoload/shebang_create_exec.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/shebang_create_exec.vim b/autoload/shebang_create_exec.vim index 1ce68e3..a69600a 100644 --- a/autoload/shebang_create_exec.vim +++ b/autoload/shebang_create_exec.vim @@ -71,7 +71,7 @@ function! s:MakeExecutable(filename) abort " 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') + let filename_escaped = exists('*shellescape') \ ? shellescape(filename) \ : '''' . escape(filename, '''') . '''' -- cgit v1.2.3 From 0855a2543d5e8d48522d6b52c43bd7d72fe02ea7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 01:27:08 +1200 Subject: Improve clarity of comment --- autoload/shebang_create_exec.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/shebang_create_exec.vim b/autoload/shebang_create_exec.vim index a69600a..8ae659e 100644 --- a/autoload/shebang_create_exec.vim +++ b/autoload/shebang_create_exec.vim @@ -70,7 +70,7 @@ 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 + " shellescape() if we've got it, or manual UNIX sh quoting if not let filename_escaped = exists('*shellescape') \ ? shellescape(filename) \ : '''' . escape(filename, '''') . '''' -- cgit v1.2.3 From 6b5d1aba3b0f84b48dfbb9d638b219854ecada2a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 01:27:15 +1200 Subject: Correct manual UNIX shellescape() implementation --- autoload/shebang_create_exec.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/shebang_create_exec.vim b/autoload/shebang_create_exec.vim index 8ae659e..60d2276 100644 --- a/autoload/shebang_create_exec.vim +++ b/autoload/shebang_create_exec.vim @@ -73,7 +73,7 @@ function! s:MakeExecutable(filename) abort " 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) -- cgit v1.2.3 From d6d54a9db5f87c0fee598e3a75f0fcdc5d1d3025 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 01:28:36 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3eefcb9..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +1.0.1 -- cgit v1.2.3