1
0
Fork 0

Look for gnu-coreutils commands instead of $OSTYPE

It's possible to have the gnu-coreutils on other environments than Linux
pull/134/head
Colin Hebert 13 years ago
parent 000b3653e6
commit 97a244ee49

@ -8,7 +8,7 @@
function duh { function duh {
(( $# == 0 )) && set -- * (( $# == 0 )) && set -- *
if [[ "$OSTYPE" == linux* ]]; then if (( $+commands[dircolors] )); then
du -khsc "$@" | sort -h -r du -khsc "$@" | sort -h -r
else else
du -kcs "$@" | awk '{ printf "%9.1fM %s\n", $1 / 1024, $2 } ' | sort -n -r du -kcs "$@" | awk '{ printf "%9.1fM %s\n", $1 / 1024, $2 } ' | sort -n -r
@ -17,4 +17,3 @@ function duh {
compdef _du duh compdef _du duh
duh "$@" duh "$@"

Loading…
Cancel
Save