Do not need to check for unix os here.

This commit is contained in:
Bubba 2018-06-15 12:02:58 -04:00
parent a053179d6a
commit 08db3a0eea

View File

@ -225,13 +225,12 @@ endfunction
function! NERDTreeListNode()
let treenode = g:NERDTreeFileNode.GetSelected()
if !empty(treenode)
if has("unix")
let s:uname = system("uname")
let stat_cmd = 'stat -c "%s" '
if s:uname =~? "Darwin"
let stat_cmd = 'stat -f "%z" '
endif
endif
let cmd = 'size=$(' . stat_cmd . shellescape(treenode.path.str()) . ') && ' .
\ 'size_with_commas=$(echo $size | sed -e :a -e "s/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta") && ' .