From: Iain Patterson Date: Wed, 4 Nov 2009 22:01:40 +0000 (+0000) Subject: Fix diffs of files with spaces. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=eee115c5a05f6e4441f820a67865af17a717ae13;p=profile.git Fix diffs of files with spaces. Show diffs correctly in p4 and svn Vim scripts when files to diff contain spaces. --- diff --git a/.vim/script/p4 b/.vim/script/p4 index 8b6ee16..3dd4217 100644 --- a/.vim/script/p4 +++ b/.vim/script/p4 @@ -21,7 +21,7 @@ fun! P4submit() set nomod " Get the files in the changelist. - let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\\1@p' " . bufname("")) + let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\"\\1\"@p' " . bufname("")) " Create a new window, move it below the spec and read in a diff. botright new if l:files != "" diff --git a/.vim/script/svn b/.vim/script/svn index bb05173..d5244fb 100644 --- a/.vim/script/svn +++ b/.vim/script/svn @@ -5,7 +5,7 @@ fun! SVNcommit() set nomod " Get the modified files. Discount new files. - let l:files = system("sed -n '1,/^$/d;s/^[MR]....//p' " . bufname("")) + let l:files = system("sed -n '1,/^$/d;/^[MR]..../{s//\"/;s/$/\"/p;}' " . bufname("")) if l:files == "" return