From 854a8df0d06b8d3fcb30fa7f2b08c62b553eee3b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 19 Jan 2024 18:00:43 -0500 Subject: [PATCH] Support edit script when temp dir name contains space Looks like GIT_EDITOR supports quotes now. Resolves: https://github.com/tpope/vim-fugitive/issues/2255 --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c136850..15d9f84 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -273,6 +273,9 @@ function! s:TempScript(...) abort if !filereadable(temp) call writefile(['#!/bin/sh'] + a:000, temp) endif + if temp =~# '\s' + let temp = '"' . temp . '"' + endif return FugitiveGitPath(temp) endfunction