[Helptags] Fix perl script for Windows (#1036)

Temporary perl script that parses output of help grep doesn't take into
account backward slash as windows path separator.

Fixes #987
This commit is contained in:
Maxim Kim
2020-05-23 14:33:04 +03:00
committed by GitHub
parent a74605b81d
commit 996ec3b4b0

View File

@@ -1021,7 +1021,7 @@ function! fzf#vim#helptags(...)
silent! call delete(s:helptags_script)
endif
let s:helptags_script = tempname()
call writefile(['/('.(s:is_win ? '^[A-Z]:\/.*?[^:]' : '.*?').'):(.*?)\t(.*?)\t/; printf(qq('.s:green('%-40s', 'Label').'\t%s\t%s\n), $2, $3, $1)'], s:helptags_script)
call writefile(['/('.(s:is_win ? '^[A-Z]:[\/\\].*?[^:]' : '.*?').'):(.*?)\t(.*?)\t/; printf(qq('.s:green('%-40s', 'Label').'\t%s\t%s\n), $2, $3, $1)'], s:helptags_script)
return s:fzf('helptags', {
\ 'source': 'grep -H ".*" '.join(map(tags, 'fzf#shellescape(v:val)')).
\ ' | perl -n '.fzf#shellescape(s:helptags_script).' | sort',