it looks like

fzf —bind “enter:become(ohpen {})”

this tells fzf to bind the enter key to “ohpen” which is a shell script with a case statement.

case $1 in

*.mp4|*.mkv|*.mov)

mpv “$1”;;

*.mp3|*.ogg)

mpv —no-video “$1”;;

*)”${EDITOR:=nvi}” “$1”;;

esac

but with many more file types, covering most cases.

the command is bound to ‘ff’ as a shell alias, so in any directory, ff brings up a searchable list, and opens whatever file you choose in the appropriate program.

it’s incredibly fast.

you can also add ripgrep which lets you search for words inside documents, and open them.

Reply to this note

Please Login to reply.

Discussion

Wow, I didn't know, that for me there's yet another use case for fzf!

Thanks is for that.

This is wild 🫠