From a0b2e5d24030c69d759d3c32985562a209175abc Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 3 May 2020 19:51:04 +0100 Subject: [PATCH] Inline linuxbrew setup to save around 200ms on shell startup speed --- zshenv | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zshenv b/zshenv index f2d21f9..74abf16 100644 --- a/zshenv +++ b/zshenv @@ -98,7 +98,14 @@ fi # Linuxbrew if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + # Inline linux-brew setup to improve shell startup speed by around 200ms. + export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" + export HOMEBREW_CELLAR="${HOMEBREW_PREFIX}/Cellar" + export HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew" + export MANPATH="${HOMEBREW_PREFIX}/share/man${MANPATH+:$MANPATH}:" + export INFOPATH="${HOMEBREW_PREFIX}/share/info${INFOPATH+:$INFOPATH}" + path_prepend "${HOMEBREW_PREFIX}/bin" + path_prepend "${HOMEBREW_PREFIX}/sbin" fi # Android SDK environment setup.