From 2a0691f65481e73478228d9e20c08d1b75609af3 Mon Sep 17 00:00:00 2001 From: Andrea Mistrali Date: Fri, 29 Oct 2021 06:41:24 +0200 Subject: [PATCH] Speedup --- zsh.d/Darwin/50-darwin.zsh | 2 ++ zsh.d/Darwin/60-complete.zsh | 11 ----------- zshrc | 1 + 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 zsh.d/Darwin/60-complete.zsh diff --git a/zsh.d/Darwin/50-darwin.zsh b/zsh.d/Darwin/50-darwin.zsh index 4d2f3e3..4e49bce 100644 --- a/zsh.d/Darwin/50-darwin.zsh +++ b/zsh.d/Darwin/50-darwin.zsh @@ -10,6 +10,8 @@ for prefix in /usr/local /opt/homebrew; do brew=$(whence $prefix/bin/brew) if [ $brew ]; then eval "$($brew shellenv)" + FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" + break fi done diff --git a/zsh.d/Darwin/60-complete.zsh b/zsh.d/Darwin/60-complete.zsh deleted file mode 100644 index 59a93b1..0000000 --- a/zsh.d/Darwin/60-complete.zsh +++ /dev/null @@ -1,11 +0,0 @@ -if type brew &>/dev/null;then - FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" - # - # Reload compinit and bashcompinit, to parse brew installed completions - autoload -U compinit - autoload bashcompinit - compinit -u - bashcompinit - -fi - diff --git a/zshrc b/zshrc index 7a503f1..6b74de3 100644 --- a/zshrc +++ b/zshrc @@ -7,6 +7,7 @@ # Global Order: zshenv, zprofile, zshrc, zlogin # +zmodload zsh/zprof # Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other should be /etc # [ -d /etc/zsh ] && BASE="/etc/zsh" || BASE="/etc"