junegunn / junegunn/fzf.vim

Preview fails in nvim Windows with shell=pwsh

Open
#1,307 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
10.3k
Forks
608
Avg merge
5d 8h
Merged PRs (30d)
2

Description

- [x] I have fzf 0.23.0 or above
- [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- [x] I have read through the manual page of fzf (`man fzf`)
- [x] I have searched through the existing issues

Line 41 works and the preview shows up fine on windows 10 if shell=cmd, but the syntax is incorrect if using powershell:
https://github.com/junegunn/fzf.vim/blob/e34f6c129d39b90db44df1107c8b7dfacfd18946/autoload/fzf/vim.vim#L39-L45

Somewhat related to this comment:
https://github.com/junegunn/fzf.vim/issues/1242#issuecomment-801935970

I'm not really familiar with the purpose of that line or how this would be handled gracefully. fwiw though I can get by personally by just removing line 41.

Not related, but I do have git bash in my path for actually calling preview.sh script.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in autoload/fzf/vim.vim around lines 39-45, comparing the preview command behavior when Vim uses cmd versus powershell. Review the related discussion in fzf.vim issue 1242 and the preview.sh invocation. Done means preview works on Windows with shell=pwsh without breaking the existing cmd behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.