summaryrefslogtreecommitdiff
path: root/prompt
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 11:09:34 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 12:39:07 +0300
commitfb162b58b16046259a2400d55746e445bf1aae48 (patch)
tree8fda8212d6e743772fb897ce5e72b32b1189357d /prompt
parentfile list composition refactored (diff)
downloadgit-prompt-fb162b58b16046259a2400d55746e445bf1aae48.tar.gz
git-prompt-fb162b58b16046259a2400d55746e445bf1aae48.tar.bz2
git-prompt-fb162b58b16046259a2400d55746e445bf1aae48.zip
commented out code for remote session detection
Diffstat (limited to 'prompt')
-rwxr-xr-xprompt25
1 files changed, 13 insertions, 12 deletions
diff --git a/prompt b/prompt
index 92d7266..092e18e 100755
--- a/prompt
+++ b/prompt
@@ -170,20 +170,21 @@ export -f set_shell_title
########################################################### HOST
### we don't display home host/domain $SSH_* set by SSHD or keychain
- # is sshd our perent?
- if [[ "$SSH_AUTH_SOCK" ]] ||
- for ((pid=$$; $pid != 1 ; pid=`ppid_of $pid`)); do ps h -o command -p $pid; done | grep -q sshd
- then
+ # I give up. How to find out if session is local or remote? Working with "su -", ssh-agent, and so on ?
+ ## is sshd our perent?
+ # if { for ((pid=$$; $pid != 1 ; pid=`ps h -o pid --ppid $pid`)); do ps h -o command -p $pid; done | grep -q sshd }
+ #then
host=${HOSTNAME}
#host=`hostname --short`
- #host=`echo ${host%$default_host} | tr a-z A-Z`
- host=`echo ${host} | tr a-z A-Z`
- eval host_color=\$${host}_host_color
- else
- host=""
- fi
-
- eval host_color="\$$host_color"
+ host=`echo ${host%$default_host} | tr a-z A-Z`
+ #host=`echo ${host} | tr a-z A-Z`
+ host_color=${host}_host_color
+ host_color=${!host_color}
+ #else
+ # host=""
+ #fi
+
+ host_color=${!host_color}
# we already should have short host name, but just in case
host=${host%.localdoman}