autoload/fzf: don't user fzf#shellescape in favor of shellescape (#1582)

fzf#shellescape should only be used when building commands that fzf will run.
This commit is contained in:
Simon Désaulniers
2025-02-21 20:41:20 -05:00
committed by GitHub
parent 6cda389bde
commit f06bd1e69b

View File

@@ -712,7 +712,7 @@ endfunction
function! s:get_git_root(dir)
let dir = len(a:dir) ? a:dir : substitute(split(expand('%:p:h'), '[/\\]\.git\([/\\]\|$\)')[0], '^fugitive://', '', '')
let root = systemlist('git -C ' . fzf#shellescape(dir) . ' rev-parse --show-toplevel')[0]
let root = systemlist('git -C ' . shellescape(dir) . ' rev-parse --show-toplevel')[0]
return v:shell_error ? '' : (len(a:dir) ? fnamemodify(a:dir, ':p') : root)
endfunction