junegunn / junegunn/fzf.vim

Preview broken by default on linux with powershell

Open
#1,139 1 comment 0 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.22.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

-------

### Issue
On a fresh install executing `:Files` causes the preview to display the following error:

![image](https://user-images.githubusercontent.com/58179604/96200644-c9000280-0f30-11eb-914d-14d5b41092c8.png)

The execution of the preview script fails, I assume it's due to the use of single quotes instead of double quotes.

### Workaround

I had to override Files command like shown in the fzf.vim readme for it to work

```vim
" .vimrc
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(, {'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh {}']}, 0)
```

Although this is not perfect since all commands that call `fzf#vim#with_preview` have the exact same error, like `:Rg` and must be tweaked independently.

--------

#### System info

- **OS**: Manjaro Linux x86_64
- **Desktop**: Plasma 5.19.5
- **Shell**: pwsh PowerShell 7.0.3
- **fzf**: 0.22.0
- **vim**: Vi Improved 8.2

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.