From bf45a3c30454d87a02e60550b105803bdbd5972f Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 19 Sep 2022 21:27:07 -0700 Subject: [PATCH] use homebrew's completions --- runcoms/zshrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/runcoms/zshrc b/runcoms/zshrc index 9b102cf..a347d7c 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -32,7 +32,7 @@ alias plz=sudo alias ls=exa alias emacs="emacs --no-window" alias tmux="direnv exec / tmux" -alias ,df="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" +alias ,df="git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME" function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; } @@ -157,4 +157,13 @@ if [ $commands[exa] ]; then export EXA_COLORS="di=34" fi +# https://docs.brew.sh/Shell-Completion +if type brew &>/dev/null +then + FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" + + autoload -Uz compinit + compinit +fi + [[ -s "$HOME/.zshrc.local" ]] && . "$HOME/.zshrc.local"