diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-06 20:22:35 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-06 20:22:35 +0300 |
commit | ddadd2ce9801703ee3ed1df2adfb6cae9855e260 (patch) | |
tree | b87a0590b16277eb776ee79e6a2f5a8cf45aa971 | |
parent | removed sCRn marker (diff) | |
parent | Merge pull request #17 from juanpabloaj/cygwin (diff) | |
download | git-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.tar.gz git-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.tar.bz2 git-prompt-ddadd2ce9801703ee3ed1df2adfb6cae9855e260.zip |
Merge branch 'master' of github.com:lvv/git-prompt
-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 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` |