mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Better OSX detection
This commit is contained in:
@@ -225,10 +225,12 @@ endfunction
|
||||
function! NERDTreeListNode()
|
||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||
if !empty(treenode)
|
||||
if has("osx")
|
||||
let stat_cmd = 'stat -f "%z" '
|
||||
else
|
||||
let stat_cmd = 'stat -c "%s" '
|
||||
if has("unix")
|
||||
let s:uname = system("uname")
|
||||
let stat_cmd = 'stat -c "%s" '
|
||||
if s:uname == "Darwin\n"
|
||||
let stat_cmd = 'stat -f "%z" '
|
||||
endif
|
||||
endif
|
||||
|
||||
let cmd = 'size=$(' . stat_cmd . shellescape(treenode.path.str()) . ') && ' .
|
||||
|
||||
Reference in New Issue
Block a user