From 9469e7961280ac2cce311cd5efb379cb31b005db Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Mon, 7 Dec 2020 11:24:22 +0800 Subject: [PATCH] zsh: git path --- .zshrc | 9 ++++++++- zsh/env.zsh | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 52141ea..64d7a9f 100644 --- a/.zshrc +++ b/.zshrc @@ -76,7 +76,7 @@ zinit load voronkovich/gitignore.plugin.zsh zinit load djui/alias-tips -export ASDF_DIR=$(brew --prefix asdf) +export ASDF_DIR=$HOME/.asdf # ASDF @@ -119,6 +119,13 @@ esac #. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash # Compinit : After zinits, before cdreplay # https://carlosbecker.com/posts/speeding-up-zsh/ +if type brew &>/dev/null; then + FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH + + autoload -Uz compinit + compinit +fi +fpath=(${ASDF_DIR}/completions $fpath) autoload -Uz compinit if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then compinit; diff --git a/zsh/env.zsh b/zsh/env.zsh index e8ababd..4b181ae 100644 --- a/zsh/env.zsh +++ b/zsh/env.zsh @@ -135,3 +135,9 @@ if [[ -d $HOME/go ]]; then export GOPATH=$HOME/go export PATH="$PATH:$GOPATH/bin" fi + +if [[ -d $HOME/.cargo ]]; then + export PATH="$PATH:$HOME/.cargo/bin" +fi + +export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"