fzfx
fzfx copied to clipboard
Switch between sources/modes
Switching between sources is not problematic as only the query would change and Fzf even have an example of it on the README.
FZF_DEFAULT_COMMAND='find . -type f' \
fzf --bind 'ctrl-d:reload(find . -type d),ctrl-f:reload($FZF_DEFAULT_COMMAND)' \
--height=50% --layout=reverse
But switching between modes like conventional file search to ps
, cd
, cp
, mv
is another story.
One difficulty is dealing with source/mode specifics. Having a complex spaghetti codebase that is difficult to maintain and improve is not desired.
The 'change-prompt' discussed bellow might be useful https://github.com/junegunn/fzf/issues/2423