summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2011-05-17 08:31:13 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2011-05-17 08:31:13 +0300
commit8d1db1b91724db1b4dd386cc87e866a45d93637c (patch)
tree4f7777d2d384bcd594a2090fa9c22ffc939a233b /git-prompt.sh
parent-- commit test (diff)
parentshort hostname cleanup (diff)
downloadgit-prompt-8d1db1b91724db1b4dd386cc87e866a45d93637c.tar.gz
git-prompt-8d1db1b91724db1b4dd386cc87e866a45d93637c.tar.bz2
git-prompt-8d1db1b91724db1b4dd386cc87e866a45d93637c.zip
Merge branch 'master' of github.com:lvv/git-prompt
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-xgit-prompt.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index 3025f95..28e2de6 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -62,6 +62,7 @@
max_file_list_length=${max_file_list_length:-100}
+ short_hostname=${short_hostname:-off}
upcase_hostname=${upcase_hostname:-on}
count_only=${count_only:-off}
rawhex_len=${rawhex_len:-5}
@@ -297,7 +298,9 @@ set_shell_label() {
#then
host=${HOSTNAME}
- #host=`hostname -s`
+ if [[ $short_hostname = "on" ]]; then
+ host=`hostname -s`
+ fi
host=${host#$default_host}
uphost=`echo ${host} | tr a-z A-Z`
if [[ $upcase_hostname = "on" ]]; then