Skip to content

Commit 50b95cb

Browse files
jsatkdag
authored andcommitted
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 #36 (comment)
1 parent f3d20ce commit 50b95cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ftplugin/fish.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ endif
2929
" Use the 'man' wrapper function in fish to include fish's man pages.
3030
" Have to use a script for this; 'fish -c man' would make the the man page an
3131
" argument to fish instead of man.
32-
execute 'setlocal keywordprg=fish\ '.escape(expand('<sfile>:p:h:h'), ' ').'/bin/man.fish'
32+
execute 'setlocal keywordprg=fish\ '.fnameescape(expand('<sfile>:p:h:h').'/bin/man.fish')
3333

3434
let b:match_words =
3535
\ escape('<%(begin|function|if|switch|while|for)>:<end>', '<>%|)')

0 commit comments

Comments
 (0)