Remove fzf/fasd dependency

This commit is contained in:
Henrik Lissner 2016-02-25 18:37:43 -05:00
parent 1bc935d2d4
commit 76e3af21cb
3 changed files with 4 additions and 38 deletions

View file

@ -15,15 +15,3 @@ do
[ "$1" == "--force" ] && rm -f "$filep"
[ -e "$filep" ] || ln -vs "$rcfile" "$filep"
done
# Install fzf and fasd
case $OSTYPE in
darwin*)
brew install fzf fasd
;;
linux*)
_clone https://github.com/junegunn/fzf ~/.fzf
_clone https://github.com/clvv/fasd ~/fasd && \
cd ~/fasd && make install && rm -rf ~/fasd
;;
esac

23
zsh/fzf
View file

@ -1,23 +0,0 @@
#!/usr/bin/env zsh
local fzf_path="/usr/local/opt/fzf"
if [[ ! -d "$fzf_path" && -d "$HOME/.fzf" ]]; then
fzf_path="$HOME/.fzf"
else
return
fi
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_DEFAULT_OPTS='--reverse --inline-info'
if [[ ! "$PATH" == *$fzf_path/bin* ]]; then
export PATH="$PATH:$fzf_path/bin"
fi
if [[ ! "$MANPATH" == *$fzf_path/man* && -d "$fzf_path/man" ]]; then
export MANPATH="$MANPATH:$fzf_path/man"
fi
is-interactive && source "$fzf_path/shell/completion.zsh" 2> /dev/null
source "$fzf_path/shell/key-bindings.zsh"

7
zshrc
View file

@ -29,10 +29,11 @@ fi
cache rbenv init - --no-rehash
cache pyenv init - --no-rehash
is-interactive && cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install
is-callable tmuxifier && is-interactive && cache tmuxifier init -
if is-interative; then
is-callable fasd && cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install
is-callable tmuxifier && cache tmuxifier init -
fi
iload zsh/fzf
load zsh/config
iload zsh/keybinds
iload zsh/prompt