Update plugin to escape path to bin/man.fish (#37)

Previously an error would throw if the path to `/bin/man.fish` involved spaces or other special characters. This commit escapes the string before having Vim parse it. 

Resolves https://github.com/dag/vim-fish/issues/36#issuecomment-254576309
This commit is contained in:
Jesse Atkinson 2017-11-22 13:58:10 -08:00 committed by Dag Odenhall
parent f3d20cee00
commit 50b95cbbcd

View file

@ -29,7 +29,7 @@ endif
" Use the 'man' wrapper function in fish to include fish's man pages.
" Have to use a script for this; 'fish -c man' would make the the man page an
" argument to fish instead of man.
execute 'setlocal keywordprg=fish\ '.escape(expand('<sfile>:p:h:h'), ' ').'/bin/man.fish'
execute 'setlocal keywordprg=fish\ '.fnameescape(expand('<sfile>:p:h:h').'/bin/man.fish')
let b:match_words =
\ escape('<%(begin|function|if|switch|while|for)>:<end>', '<>%|)')