Skip to content
Myr

[vim] Do not pathshorten prompt in cygwin (#1043)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Prevents the following case: before pathshorten - /usr/bin after pathshorten - /u/bin piped to cmd.exe - U:/bin

authored by Jan Edmund Lazo · committed by Junegunn Choi · parent 5edc3f7 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:plugin/fzf.vim+4 added-1 removed
770 unmodified lines
771 \ 'ctrl-x': 'split',772 \ 'ctrl-v': 'vsplit' }773774function! s:shortpath()775 let short = pathshorten(fnamemodify(getcwd(), ':~:.'))775 let short = fnamemodify(getcwd(), ':~:.')776 if !has('win32unix')777 let short = pathshorten(short)778 endif779 let slash = (s:is_win && !&shellslash) ? '\' : '/'780 return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)781endfunction782
22 unmodified lines