commit c0d87db309d2ba74230c9f1a2e64be1aa2c51c58 parent 26abd33ad9708c043eaffeb946e6dd1124453c5c Author: Bubba <rob@stechstudio.com> Date: Fri, 15 Jun 2018 10:43:20 -0400 Better OSX detection Diffstat:
| M | nerdtree_plugin/fs_menu.vim | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nerdtree_plugin/fs_menu.vim b/nerdtree_plugin/fs_menu.vim @@ -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()) . ') && ' .
