# cf - fuzzy cd from anywhere cf() { local file # previously had "grep -z -vE '~$'" in the pipeline file="$(locate -Ai -0 \* | fzf --read0)" if [[ -n $file ]] then if [[ -d $file ]] then cd -- $file else cd -- ${file:h} fi fi } rf() { rg --no-heading --no-line-number --color never . | fzf } fh() { print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//') } # bindkey -s '^f' 'cf\n' # bindkey -s '^h' 'fh\n'