diff --git a/zsh/functions/_evalcache b/zsh/functions/_evalcache deleted file mode 100755 index ecbea7c..0000000 --- a/zsh/functions/_evalcache +++ /dev/null @@ -1,50 +0,0 @@ -# Caches the output of a binary initialization command, to avoid the time to -# execute it in the future. -# -# Usage: _evalcache [NAME=VALUE]... COMMAND [ARG]... - -# default cache directory -export ZSH_EVALCACHE_DIR=${ZSH_EVALCACHE_DIR:-"$HOME/.zsh-evalcache"} - -function _evalcache () { - local cmdHash="nohash" data="$*" name - - # use the first non-variable argument as the name - for name in $@; do - if [ "${name}" = "${name#[A-Za-z_][A-Za-z0-9_]*=}" ]; then - break - fi - done - - # if command is a function, include its definition in data - if typeset -f "${name}" > /dev/null; then - data=${data}$(typeset -f "${name}") - fi - - if builtin command -v md5 > /dev/null; then - cmdHash=$(echo -n "${data}" | md5) - elif builtin command -v md5sum > /dev/null; then - cmdHash=$(echo -n "${data}" | md5sum | cut -d' ' -f1) - fi - - local cacheFile="$ZSH_EVALCACHE_DIR/init-${name##*/}-${cmdHash}.sh" - - if [ "$ZSH_EVALCACHE_DISABLE" = "true" ]; then - eval ${(q)@} - elif [ -s "$cacheFile" ]; then - source "$cacheFile" - else - if type "${name}" > /dev/null; then - echo "evalcache: ${name} initialization not cached, caching output of: $*" >&2 - mkdir -p "$ZSH_EVALCACHE_DIR" - eval ${(q)@} > "$cacheFile" - source "$cacheFile" - else - echo "evalcache: ERROR: ${name} is not installed or in PATH" >&2 - fi - fi -} - -function _evalcache_clear () { - rm -i "$ZSH_EVALCACHE_DIR"/init-*.sh -} diff --git a/zshrc b/zshrc index 121b335..1091846 100755 --- a/zshrc +++ b/zshrc @@ -29,18 +29,15 @@ fi # Do this before setting up PATH so ~/bin and similar still have the highest precedence. if command_exists rbenv; then - _evalcache rbenv init - + eval "$(rbenv init -)" fi if command_exists pyenv; then - _evalcache pyenv init - + eval "$(pyenv init -)" fi if command_exists direnv; then - _evalcache direnv hook zsh + eval "$(direnv hook zsh)" fi -### SSH keys -# ============ - ### Environment Vars # ===================