by pneto · 5y ago · 0 comments
# fuzzy search any command
f(){
ROOT_DIR="."
[ -n "$2" ] && ROOT_DIR="$2"
FZF_OUT=`fd . -H --color=always "$ROOT_DIR" --exclude "Software/"| fzf --query="$3"`
[ -n "$FZF_OUT" ] && "$1" "$FZF_OUT"
}
in my case Software/ is a directory with lots of files I don't need so I exclude it from my searches. I also like using ranger, it has very nice bookmarking and launcher features.No comments yet.