We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48176c4 commit bdf5fdfCopy full SHA for bdf5fdf
autoload/dirvish.vim
@@ -71,7 +71,7 @@ function! s:info(paths, dirsize) abort
71
" Slash decides how getftype() classifies directory symlinks. #138
72
let noslash = substitute(f, escape(s:sep,'\').'$', '', 'g')
73
let fname = len(a:paths) < 2 ? '' : printf('%12.12s ',fnamemodify(substitute(f,'[\\/]\+$','',''),':t'))
74
- let size = (-1 != getfsize(f) && a:dirsize ? matchstr(system(['du','-hs',f]),'\S\+') : printf('%.2f',getfsize(f)/1000.0).'K')
+ let size = (-1 != getfsize(f) && a:dirsize ? matchstr(system('du -hs '.shellescape(f)),'\S\+') : printf('%.2f',getfsize(f)/1000.0).'K')
75
echo (-1 == getfsize(f) ? '?' : (fname.(getftype(noslash)[0]).' '.getfperm(f)
76
\.' '.strftime('%Y-%m-%d.%H:%M:%S',getftime(f)).' '.size).('link'!=#getftype(noslash)?'':' -> '.fnamemodify(resolve(f),':~:.')))
77
endfor
0 commit comments