Hi.
The updated gzip.vim looks all-right; just one rather subtle thing:
In case we're editing a file with a file name that starts with a dash,
the invocation of the compress program should use a double-dash to
signal the end of optional arguments.
Patch is attached.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Add double-dash in case we're editing a filename that starts with a dash.
--- /usr/local/share/vim/vim72a/autoload/gzip.vim 2008-07-01 18:38:09.000000000 +0100
+++ runtime/autoload/gzip.vim 2008-07-04 00:57:34.648114426 +0100
@@ -153,9 +153,9 @@
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
- call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt))
+ call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
else
- call system(a:cmd . " " . s:escape(nmt))
+ call system(a:cmd . " -- " . s:escape(nmt))
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
@@ -180,7 +180,7 @@
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
- call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt))
+ call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
call rename(nmte, nm . &patchmode)
else
call system(a:cmd . " " . s:escape(nmte))