diff options
-rwxr-xr-x | git-prompt.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 8bdbb3f..fb24030 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -297,7 +297,11 @@ set_shell_label() { host=${HOSTNAME} if [[ $short_hostname = "on" ]]; then - host=`hostname -s` + if [[ "$(uname)" =~ "CYGWIN" ]]; then + host=`hostname` + else + host=`hostname -s` + fi fi host=${host#$default_host} uphost=`echo ${host} | tr a-z A-Z` |