summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2012-07-06 20:22:35 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2012-07-06 20:22:35 +0300
commitddadd2ce9801703ee3ed1df2adfb6cae9855e260 (patch)
treeb87a0590b16277eb776ee79e6a2f5a8cf45aa971
parentremoved sCRn marker (diff)
parentMerge pull request #17 from juanpabloaj/cygwin (diff)
downloadgit-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.tar.gz
git-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.tar.bz2
git-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.zip
Merge branch 'master' of github.com:lvv/git-prompt
-rwxr-xr-xgit-prompt.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index b84fda2..7d09948 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -296,7 +296,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`