Do not need to check for unix os here.
This commit is contained in:
parent
a053179d6a
commit
08db3a0eea
@ -225,13 +225,12 @@ endfunction
|
|||||||
function! NERDTreeListNode()
|
function! NERDTreeListNode()
|
||||||
let treenode = g:NERDTreeFileNode.GetSelected()
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
if !empty(treenode)
|
if !empty(treenode)
|
||||||
if has("unix")
|
|
||||||
let s:uname = system("uname")
|
let s:uname = system("uname")
|
||||||
let stat_cmd = 'stat -c "%s" '
|
let stat_cmd = 'stat -c "%s" '
|
||||||
|
|
||||||
if s:uname =~? "Darwin"
|
if s:uname =~? "Darwin"
|
||||||
let stat_cmd = 'stat -f "%z" '
|
let stat_cmd = 'stat -f "%z" '
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
let cmd = 'size=$(' . stat_cmd . shellescape(treenode.path.str()) . ') && ' .
|
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") && ' .
|
\ 'size_with_commas=$(echo $size | sed -e :a -e "s/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta") && ' .
|
||||||
|
Loading…
Reference in New Issue
Block a user