summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-prompt.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index 41aa587..4178de5 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -298,7 +298,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`