Reputation: 887
I have a MacBook with Iterm2 with Zshell (zsh) and one of the add-ons I have is the command line fuzzy finder (fzf), but despite being added to my .zshrc it doesn't work. If I manually load it with source ~/.fzf.zsh
it works, and if I then reload my .zshrc source ~/.zshrc
it doesn't work again.
What could be the reason?
Here's most of my .zshrc file (see the line: # add fuzzy find):
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# add fuzzy find
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# add syntax highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/local/share/zsh-syntax-highlighting/highlighters
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Path to your oh-my-zsh installation.
export ZSH="/Users/xxxx/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git)
source $ZSH/oh-my-zsh.sh
DEFAULT_USER=`whoami`
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
alias pip=/usr/local/bin/pip3
Upvotes: 1
Views: 1991
Reputation: 532093
Something you do in .zshrc
following source ~/.fzf.zsh
breaks it. Make sure ~/.fzf.zsh
occurs after that, most easily accomplished by moving it to the end of the file.
Upvotes: 3