Merge pull request #853 from bubba-h57/master

Better OSX detection
This commit is contained in:
Phil Runninger 2018-06-15 12:04:30 -04:00 committed by GitHub
commit d6032c876c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,10 +225,11 @@ endfunction
function! NERDTreeListNode()
let treenode = g:NERDTreeFileNode.GetSelected()
if !empty(treenode)
if has("osx")
let stat_cmd = 'stat -f "%z" '
else
let s:uname = system("uname")
let stat_cmd = 'stat -c "%s" '
if s:uname =~? "Darwin"
let stat_cmd = 'stat -f "%z" '
endif
let cmd = 'size=$(' . stat_cmd . shellescape(treenode.path.str()) . ') && ' .