From 118d08f67db00eb0092a53c44d5ff7a12f079357 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 9 May 2022 20:33:54 -0700 Subject: [PATCH] update with a few tweaks - Use `$HOMEBREW_PREFIX` since it's already there - Don't `chruby ruby` automatically since it messes with `$PATH` - Try using fzf's builtins --- runcoms/zshrc | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/runcoms/zshrc b/runcoms/zshrc index 59dc4ea..47fa21e 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -35,23 +35,13 @@ alias tmux="direnv exec / tmux" function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; } -if [ -e /opt/homebrew/bin/brew ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -fi -if [ -e /usr/local/bin/brew ]; then - eval "$(/usr/local/bin/brew shellenv)" -fi -brew_prefix=$(brew --prefix) - -if [ $commands[chruby] ]; then - chruby ruby -fi +eval "$($HOMEBREW_PREFIX/bin/brew shellenv)" [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -if [ -e $brew_prefix/opt/fzf/shell/completion.zsh ]; then - source $brew_prefix/opt/fzf/shell/key-bindings.zsh - source $brew_prefix/opt/fzf/shell/completion.zsh +if [ -e $HOMEBREW_PREFIX/opt/fzf/shell/completion.zsh ]; then + source $HOMEBREW_PREFIX/opt/fzf/shell/key-bindings.zsh + source $HOMEBREW_PREFIX/opt/fzf/shell/completion.zsh fi [ -x "$(command -v kubectl)" ] && source <(kubectl completion zsh) @@ -62,9 +52,9 @@ fi if [ $commands[fzf] ]; then export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border' - export FZF_DEFAULT_COMMAND="rg --files" - export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" - export FZF_ALT_C_COMMAND="find . -type d" + # export FZF_DEFAULT_COMMAND="rg" + # export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + # export FZF_ALT_C_COMMAND="find . -type d" # alias fzf=fzf-tmux # https://github.com/junegunn/fzf/issues/164#issuecomment-581837757