From dc5f9437fcaed9f6896235830246871fdf9c9ba8 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 19 Apr 2018 17:55:22 +0900 Subject: [PATCH] [BTags] Use sort executable only on Unix (excluding Cygwin) (#620) --- autoload/fzf/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 3da0242..a3e3bd7 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -744,7 +744,7 @@ function! fzf#vim#buffer_tags(query, ...) let args = copy(a:000) let escaped = fzf#shellescape(expand('%')) let null = s:is_win ? 'nul' : '/dev/null' - let sort = executable('sort') ? '| sort -s -k 5' : '' + let sort = has('unix') && !has('win32unix') && executable('sort') ? '| sort -s -k 5' : '' let tag_cmds = (len(args) > 1 && type(args[0]) != type({})) ? remove(args, 0) : [ \ printf('ctags -f - --sort=yes --excmd=number --language-force=%s %s 2> %s %s', &filetype, escaped, null, sort), \ printf('ctags -f - --sort=yes --excmd=number %s 2> %s %s', escaped, null, sort)]