* Fish shell doesn't like <<<
Echo to pipe instead
* Only return the first match
Useful if the commit message has a project tracker id that looks
similar to a git commit hash
Only enable --preview if &columns > 120.
Caveat: When fzf starts in a terminal buffer, &columns does not
represent the width of the window.
Related: #461
By default git will quote filenames that contain special characters.
From the git help on the `core.quotepath` config:
> The commands that output paths (e.g. `ls-files`, `diff`), when not given
> the `-z` option, will quote "unusual" characters in the pathname by
> enclosing the pathname in a double-quote pair and with backslashes the
> same way strings in C source code are quoted. If this variable is set
> to false, the bytes higher than 0x80 are not quoted but output as
> verbatim. Note that double quote, backslash and control characters are
> always quoted without `-z` regardless of the setting of this variable.
This quoting behaviour means that GitFiles cannot be used to open files
that contain any special characters. Fix this by using the `-z` option
to `ls-files` together with the `--read0` option on fzf.
s:complete_trigger should prepend the default options instead of
appending them. The bug was introduced in 25ea637.
/tmp/foo<ctrl-x><ctrl-f> should give fzf prompt "/tmp/" and default
query "foo". But it used to give "/tmp//tmp/foo".
Bypasses the following issues in Windows:
1. Neovim does not support 8.3 filenames
ie. fnamemodify(path, ':8')
2. fzf binary cannot parse output of fzf#shellescape
It assumes that preview command is run in sh, not cmd.exe
- disabled on Files because the preview scripts cannot resolve the network drive
- use 8.3 filepath for s:bin.preview to bypass escape issues in fzf binary
* [Files] runs in Windows
* Use fzf#shellescape() and copy() in s:merge_opts()
* [fzf#vim#preview] uses list type for options
- fixed s:merge_opts for extending the option list
* [fzf#vim#with_preview] no-op in Windows
Reference: https://github.com/junegunn/fzf.vim/pull/418#issuecomment-322645632
* [fzf#vim#with_preview] return passed dict in Windows
This allows us to use the return value of fzf#wrap function with
fzf#complete.
This commit also removes obsolete g:fzf#vim#default_layout and
fzf#vim#layout.