I have this function in my zshrc :
fe() {
local files
IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
[[ -n "$files" ]] && nvim "${files[@]}"
}
It lets me search for contents of the current directory I am in and then edit that file. However I wish to modify this function so that it searches only a specific directory (~/.dotifles/ in my case) from wherever I am.
I first thought to cd ~/.dotfiles and then run the remaining of the command but I wish to avoid that.
Thank you for any help.
fzf is a unix filter, so you can feed in any input like so
# You can use any command you find fit as the source
find ~/.dotfiles | fzf-tmux
I hope this answers your question.
Most helpful comment
fzf is a unix filter, so you can feed in any input like so
I hope this answers your question.