hostname in cygwin doesn't support option -s

This commit is contained in:
Michael Vetter 2013-05-27 13:52:17 +02:00
commit 816c015cf5

View file

@ -8,7 +8,11 @@
# Machine name. # Machine name.
function box_name { function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s if [[ `uname -o` == "Cygwin" ]]; then
[ -f ~/.box-name ] && cat ~/.box-name || hostname
else
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
fi
} }
# Directory info. # Directory info.