summaryrefslogtreecommitdiff
path: root/10_Environment.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-01-30 11:25:56 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-01-30 11:25:56 +0100
commita1cdd797ca0f79b7641c5478940e3fa7c109e547 (patch)
treecbb9553d74f2fa181a1da7abaa04451ab328ccce /10_Environment.zsh
parent1d11c8d26b289ca1c900255df6c49f38767c78cf (diff)
[KEYCHAIN] just source the env files, don't startup at every shell...
Diffstat (limited to '10_Environment.zsh')
-rw-r--r--10_Environment.zsh19
1 files changed, 5 insertions, 14 deletions
diff --git a/10_Environment.zsh b/10_Environment.zsh
index 9e5a1f9..53209ff 100644
--- a/10_Environment.zsh
+++ b/10_Environment.zsh
@@ -21,20 +21,11 @@ export SHELL=`which zsh`
## Agent de clefs SSH/GPG
if [ "$SUDO_USER" = "" ]
then
- if cmd_exists keychain
- then
- if [ -f ~/.keychain/startup.zsh ]
- then
- source ~/.keychain/startup.zsh --quiet
- else
- KEYCHAIN=~/.keychain/$(hostname)-sh
- [ -f ${KEYCHAIN} ] && source ${KEYCHAIN}
- [ -f ${KEYCHAIN}-gpg ] && source ${KEYCHAIN}-gpg
- cmd_exists keychain && keychain --quiet --quick --inherit any --stop others
- [ -f ${KEYCHAIN} ] && source ${KEYCHAIN}
- [ -f ${KEYCHAIN}-gpg ] && source ${KEYCHAIN}-gpg
- fi
- fi
+ KEYCHAIN=~/.keychain/$(hostname)-sh
+ for file in $(find $KEYCHAIN:h -name "$(hostname)-sh" -o -name "$(hostname)-sh-*")
+ do
+ source $file
+ done
fi
## Colors