From f47edd6c4f11b11ff3ff7d5f80d8f3b489fc4a59 Mon Sep 17 00:00:00 2001 From: Adrien Date: Wed, 19 Oct 2022 14:19:06 +0200 Subject: [PATCH] Attempt the proposal to treat git-bash like a Unix shell environment. See: https://github.com/junegunn/fzf/pull/3002#issuecomment-1279891181 --- plugin/fzf.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index d1da7b7964c..561290f1d42 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -26,7 +26,9 @@ if exists('g:loaded_fzf') endif let g:loaded_fzf = 1 -let s:is_win = has('win32') || has('win64') +# On Windows, cmd.exe does not define a `SHELL` env var, whereas git-bash does. +# Treat git-bash environment like a Unix shell. +let s:is_win = has('win32') || has('win64') && !exists('$SHELL') if s:is_win && &shellslash set noshellslash let s:base_dir = expand(':h:h')