-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Windows (requires 0.16.10) #372
Conversation
@junegunn Can the source command for Side note: |
Rebasing on master for |
- put commands in scripts for sh and perl - resolve filepath regex in perl command - use shellslash for filepaths - requires cygwin or Git for Window for Window 7 or 8
- fzf does not officially support cygwin - locate does not have a built-in Windows equivalent in Windows 7/8 - requires an additional check for Win 10 and WSL
- use temp file to prevent Vim from tampering the source command - shellescape based on the shell - noshellslash for cmd.exe - shellslash for sh.exe (requires Cygwin)
- list type for fzf options - nul, not /dev/null, for error redirection in cmd.exe - configure shellslash for expand() and shellescape()
- use list type for options - use '--output-format=e-ctags' for slashes in Windows paths - respect shellslash by passing output of expand() to s:open - use noshellslash for the source command
- let vim plugin of fzf shellescape the prompt
@junegunn Is |
No, it's a script-local function anyway. |
In let preview = printf(' --preview-window %s --preview "%s"\ %s\ {}',
\ window,
\ shellescape(s:bin.preview), window =~ 'up\|down' ? '-v' : '') |
- fix bin/ directory for "noshellslash" in Windows - put preview command in one list entry for shellescaping in cmd.exe
- use dir for file/path completion (see junegunn/fzf#971) - double-quote shell args via 'set noshellslash' for cmd.exe
@junegunn There's a |
I'll fix it after a new official binary release containing the commit is released. |
Bumping minimum required version to consider relative paths for the completer so it will be in sync with the default command(junegunn/fzf#971) and work in both vim/neovim. |
Main PR to fix commands for Windows and use list type for options if required.
Added workarounds for commands not using list type for options such as
:Helptags
fzf#shellescape
is not used in this PR soshellslash
is set/unset depending on the function.set shellslash
expand
andglob
to avoid\"
shellescape
commands on shset noshellslash
shellescape
commands on cmd.exeRequirements
PATH
to reduce maintenance burdenFunctions
s:fzf
(48ad1c3, supports list type for options)s:wrap
(48ad1c3, supports list type for options)fzf#vim#grep
(9a72951)\^"
)fzf#vim#complete
s:complete_trigger
(da8f862)fzf#vim#complete#word
(f1619d4, not supported)/usr/share/dict/words
which does not exist in Windows (no equivalent??)fzf#vim#complete#path
(24c6594)set shellslash
for nowfzf#vim#complete#line
fzf#vim#complete#buffer_line
fzf#vim#map
(no fixes required)fzf#vim#with_preview
(9535460)Commands
Files
(48ad1c3)GFiles
(no fixes required)GFiles?
(7e5a6af, list type for options not required, requires sh.exe from Cygwin)Buffers
(48ad1c3)Colors
(no fixes required)Ag
(a943f21)fzf#vim#grep
Lines
(cb86ba6)BLines
(48ad1c3)Tags
(7ed4abb)BTags
(7cfbeca)Marks
(no fixes required)Windows
(no fixes required)Locate
(052ec67, not supported)locate
requires Cygwin and is useless without indexing in Windows 7/8History
(no fixes required)History:
(no fixes required)History/
(no fixes required)Snippets
(no fixes required)Commits
(6d49ed1, requires sh.exe from Cygwin)Bcommits
(6d49ed1)Commands
Maps
(no fixes required)Helptags
(Helptags implementation #376)initial run takes about 1 minute (vimscript bottleneck?)resolved with 990834aFiletypes
(no fixes required)Mappings
<plug>(fzf-complete-word)
(f1619d4, not supported)<plug>(fzf-complete-path)
(24c6594)<plug>(fzf-complete-file)
(24c6594)<plug>(fzf-complete-file-ag)
(24c6594)<plug>(fzf-complete-line)
<plug>(fzf-complete-buffer-line)
<plug>(fzf-maps-n)
(no fixes required)<plug>(fzf-maps-i)
(no fixes required)<plug>(fzf-maps-x)
(no fixes required)<plug>(fzf-maps-o)
(no fixes required)