git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/postexec.bash
diff options
context:
space:
mode:
Diffstat (limited to '.bash/postexec.bash')
-rw-r--r--.bash/postexec.bash24
1 files changed, 21 insertions, 3 deletions
diff --git a/.bash/postexec.bash b/.bash/postexec.bash
index 564356a..0eafd2b 100644
--- a/.bash/postexec.bash
+++ b/.bash/postexec.bash
@@ -1,8 +1,26 @@
declare -x SSH_AUTH_SOCK SSH_AGENT_PID
if [ -n "$SSHENVFILE" ] && [ -r "$SSHENVFILE" ];then
if source "$SSHENVFILE"; then
- if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)$" > /dev/null;then
- add-sshagent-init
- fi
+ case "$OSNAME" in
+ 'sunos')
+ if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -E "^$(cat /etc/nodename)\$"; then
+ add-sshagent-init
+ fi
+ ;;
+ *)
+ if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)\$" > /dev/null;then
+ add-sshagent-init
+ fi
+ ;;
+ esac
fi
fi
+for gitpsrc in "/usr/share/git/git-prompt.sh" "/usr/local/share/git/git-prompt.sh" \
+ "/usr/share/git-completion/prompt.sh" "/usr/local/share/git-completion/prompt.sh"; do
+ if [ -r "$gitpsrc" ]; then
+ source "$gitpsrc"
+ break
+ fi
+done
+
+list-env-versions