Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

don't use request function in bootup

  • Loading branch information...
commit c469cdb236450e7f56d4e88c01e26d28c1792944 1 parent 8b7062c
@rsanders authored
Showing with 14 additions and 6 deletions.
  1. +1 −6 zsh/base/zshenv
  2. +13 −0 zsh/functions/request
View
7 zsh/base/zshenv
@@ -6,10 +6,6 @@ zctrace() {
fi
}
-request() {
- [[ -f $1 ]] && source $*
-}
-
function () {
local dbase dfilesdir
if [[ -z $DOTTODIR ]]; then
@@ -25,5 +21,4 @@ function () {
}
export ZCONFIGDIR=$DOTTODIR/zsh
-request $ZCONFIGDIR/core/zshenv
-
+[[ -f $ZCONFIGDIR/core/zshenv ]] && source $ZCONFIGDIR/core/zshenv
View
13 zsh/functions/request
@@ -0,0 +1,13 @@
+#!/bin/zsh
+
+#
+# source a list of files iff they are plain files or symlinks, skipping
+# them if they are missing.
+#
+
+function request () {
+ local file
+ for file in $*; do
+ [[ -r $file || (-h $file && -f ${file:A}) ]] && source $file
+ done
+}
Please sign in to comment.
Something went wrong with that request. Please try again.