aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-17 15:56:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-17 16:04:49 +1200
commit0706f32a65d51ed35cbc5f732bd2ccef2600dfca (patch)
tree55f2e25b330df9b35cf8937c48ac3bcd35b0f8ff
parentMerge branch 'release/v8.39.0' into develop (diff)
downloaddotfiles-0706f32a65d51ed35cbc5f732bd2ccef2600dfca.tar.gz
dotfiles-0706f32a65d51ed35cbc5f732bd2ccef2600dfca.zip
Rehash plenv/pyenv on usage, not shell startup
Probably a better place for it; it's too slow otherwise.
-rw-r--r--plenv/shrc.d/plenv.sh5
-rw-r--r--pyenv/shrc.d/pyenv.sh5
2 files changed, 8 insertions, 2 deletions
diff --git a/plenv/shrc.d/plenv.sh b/plenv/shrc.d/plenv.sh
index 5848fd5b..bb52ffe2 100644
--- a/plenv/shrc.d/plenv.sh
+++ b/plenv/shrc.d/plenv.sh
@@ -6,13 +6,16 @@ plenv() {
shift
eval "$(plenv sh-rehash "$@")"
;;
+ sh-rehash)
+ command plenv "$@"
+ ;;
shell)
shift
eval "$(plenv sh-shell "$@")"
;;
*)
command plenv "$@"
+ plenv rehash
;;
esac
}
-plenv rehash
diff --git a/pyenv/shrc.d/pyenv.sh b/pyenv/shrc.d/pyenv.sh
index 1c90f8f2..0a946164 100644
--- a/pyenv/shrc.d/pyenv.sh
+++ b/pyenv/shrc.d/pyenv.sh
@@ -6,13 +6,16 @@ pyenv() {
shift
eval "$(pyenv sh-rehash "$@")"
;;
+ sh-rehash)
+ command pyenv "$@"
+ ;;
shell)
shift
eval "$(pyenv sh-shell "$@")"
;;
*)
command pyenv "$@"
+ pyenv rehash
;;
esac
}
-pyenv rehash