fzf.vim commands opening up incorrect shell and not invoking fzf processes.
- Dominant language
- Vim Script
- Stars
- 10.3k
- Forks
- 608
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 2
Description
- Category
- [ ] Question
- [x] Bug
- [ ] Suggestion
- OS
- [ ] Linux
- [ ] macOS
- [x] Windows
- [ ] Etc.
- Vim
- [x] Vim
- [ ] Neovim
I am currently using `gvim_8.1.0095_x64` on `Windows 7`.
fzf and fzf.vim are updated to the latest versions.
fzf is correctly set in `PATH` and runs without any issues in any terminal emulators.
```
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
```
`:terminal fzf` --> Working.
`:!fzf` --> Working.
`:FZF` --> Not working. (!)
`:Files` --> Not working. (!)
... etc.
(!) Upon invoking any of the `fzf.vim` commands (`:FZF`, `:Files`, etc..), a split terminal window opens up -- (1) `&shell` is changed to `cmd.exe`, despite having `set shell=c:/Git/bin/sh.exe\ --login\ -i` in my `_vimrc` and `:terminal` will indeed spawn `git-bash`. Apart from that, (2) the open split terminal window is blank without any `fzf` processes running. (If I manually type in 'fzf' and hit Enter, `fzf` starts running in `cmd.exe` but I am unable to select any file, similar to as if I would run `:terminal fzf` or `:!fzf`).
See an attached pic below for your reference.

In addition, `:version`, if needed.
```
VIM - Vi IMproved 8.1 (2018 May 17, compiled Jun 21 2018 22:02:05)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-95
Compiled by appveyor@APPVYR-WIN
Huge version with GUI. Features included (+) or not (-):
+acl +clientserver +dialog_con_gui +file_in_path +keymap +modify_fname +perl/dyn +scrollbind -termguicolors +visual +xpm_w32
+arabic +clipboard +diff +find_in_path +lambda +mouse +persistent_undo +signs +terminal +visualextra -xterm_save
+autocmd +cmdline_compl +digraphs +float +langmap +mouseshape -postscript +smartindent -tgetent +viminfo
+autoservername +cmdline_hist +directx +folding +libcall +multi_byte_ime/dyn +printer +startuptime -termresponse +vreplace
+balloon_eval +cmdline_info -dnd -footer +linebreak +multi_lang +profile +statusline +textobjects -vtp
-balloon_eval_term +comments -ebcdic +gettext/dyn +lispindent +mzscheme/dyn +python/dyn -sun_workshop +timers +wildignore
+browse +conceal +emacs_tags -hangul_input +listcmds +netbeans_intg +python3/dyn +syntax +title +wildmenu
++builtin_terms +cryptv +eval +iconv/dyn +localmap +num64 +quickfix +tag_binary +toolbar +windows
+byte_offset +cscope +ex_extra +insert_expand +lua/dyn +ole +reltime +tag_old_static +user_commands +writebackup
+channel +cursorbind +extra_search +job +menu +packages +rightleft -tag_any_white +vertsplit -xfontset
+cindent +cursorshape +farsi +jumplist +mksession +path_extra +ruby/dyn +tcl/dyn +virtualedit -xim
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_XPM_W32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=24 -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link /nologo /subsystem:windows,5.02 /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib /machine:AMD64 libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib /STACK:8388608 /nodefaultlib:python27.lib /nodefaultlib:python36.lib "C:\Tcl\lib\tclstub86.lib" WSock32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
```
`:echo globpath(&runtimepath, 'plugin/fzf.vim')`
```
C:\Users\Boo\.fzf\plugin\fzf.vim
C:\Users\Boo\vimfiles\plugged\fzf.vim\plugin\fzf.vim
```
I checked if the issue is reproducible with a minimal configuration below (via `gVim` as well as other terminal emulators such as`git-bash` or `cmder`).
```
set nocompatible
set rtp-=~/vimfiles
set rtp+=~/vimfiles/plugged/fzf.vim
set rtp+=~/.fzf
set shell=c:/Git/bin/sh.exe\ --login\ -i
set shellcmdflag=-c
set shellxquote=\"
```
I would get same results as in the attached pic shown above.
So, I tried omitting the `shell` parts.
```
set nocompatible
set rtp-=~/vimfiles
set rtp+=~/vimfiles/plugged/fzf.vim
set rtp+=~/.fzf
```
Which resulted in this #667.
Any suggestions / help will be greatly appreciated!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.