summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zshrc32
1 files changed, 17 insertions, 15 deletions
diff --git a/zshrc b/zshrc
index f17cb5c..fbb727d 100644
--- a/zshrc
+++ b/zshrc
@@ -68,20 +68,8 @@ if [ -d $ZDOTDIR ]; then
do
if test -d $root/$f
then
- subscript=$root/$f/$script
- if test -f $subscript
- then
- __debug -n "${${subscript:h}##$ZDOTDIR\/}/$script... ";
- echo source $subscript
- __debug
- fi
- if test -f $subscript.gpg
- then
- __debug -n "${${subscript:h}##$ZDOTDIR\/}/$script [CRYPTED]... ";
- echo eval \$(gpg --quiet --decrypt $subscript.gpg)
- __debug
- fi
-
+ local sub=$root/$f/$script
+ test -f $sub && echo $sub
recurse_load $script $root/$f
fi
done
@@ -94,7 +82,21 @@ if [ -d $ZDOTDIR ]; then
source $script
__debug
- eval $(recurse_load ${${script:t}/??_/} ${script:h})
+ for f in $(recurse_load ${${script:t}/??_/})
+ do
+ case ${f:e} in
+ gpg)
+ __debug -n "${f#$ZDOTDIR/} [CRYPTED]... "
+ eval $(gpg --quiet --decrypt $f.gpg)
+ __debug
+ ;;
+ *)
+ __debug -n "${f#$ZDOTDIR/}... "
+ source $f
+ __debug
+ ;;
+ esac
+ done
done
fi