From d9a51030eaeb601edb0a7d9673655a216045046d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 2 Dec 2016 21:07:23 +0900 Subject: [PATCH] [vim] Display relative path in prompt --- plugin/fzf.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 96e30c4..49dc192 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -588,7 +588,7 @@ function! s:cmd(bang, ...) abort let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '/*$', '/', '') let opts.options .= ' --prompt '.shellescape(opts.dir) else - let opts.options .= ' --prompt '.shellescape(pathshorten(getcwd()).'/') + let opts.options .= ' --prompt '.shellescape(pathshorten(fnamemodify(getcwd(), ':~:.')).'/') endif let opts.options .= ' '.join(args) call fzf#run(fzf#wrap('FZF', opts, a:bang))