mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 06:46:35 +00:00
[vim] Display relative path in prompt
This commit is contained in:
parent
67026718c1
commit
d9a51030ea
@ -588,7 +588,7 @@ function! s:cmd(bang, ...) abort
|
|||||||
let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '/*$', '/', '')
|
let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '/*$', '/', '')
|
||||||
let opts.options .= ' --prompt '.shellescape(opts.dir)
|
let opts.options .= ' --prompt '.shellescape(opts.dir)
|
||||||
else
|
else
|
||||||
let opts.options .= ' --prompt '.shellescape(pathshorten(getcwd()).'/')
|
let opts.options .= ' --prompt '.shellescape(pathshorten(fnamemodify(getcwd(), ':~:.')).'/')
|
||||||
endif
|
endif
|
||||||
let opts.options .= ' '.join(args)
|
let opts.options .= ' '.join(args)
|
||||||
call fzf#run(fzf#wrap('FZF', opts, a:bang))
|
call fzf#run(fzf#wrap('FZF', opts, a:bang))
|
||||||
|
Loading…
Reference in New Issue
Block a user