From 79d2ef46160fff0a489b8c69b2930b4e1422d74b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 6 Sep 2017 22:03:26 -0400 Subject: [PATCH] [vim] Do not pathshorten prompt in cygwin (#1043) Prevents the following case: before pathshorten - /usr/bin after pathshorten - /u/bin piped to cmd.exe - U:/bin --- plugin/fzf.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 2f44909..c0bae81 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -772,7 +772,10 @@ let s:default_action = { \ 'ctrl-v': 'vsplit' } function! s:shortpath() - let short = pathshorten(fnamemodify(getcwd(), ':~:.')) + let short = fnamemodify(getcwd(), ':~:.') + if !has('win32unix') + let short = pathshorten(short) + endif let slash = (s:is_win && !&shellslash) ? '\' : '/' return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash) endfunction