Skip to content

Example: quickly select a book to read

LYF edited this page Jul 1, 2022 · 2 revisions

It uses fd and fzf.

function epub --description "Open an EPUB with brv"
	set -l base ~/OneDrive/Calibre
	fd	-t f -e epub                \
		--base-directory $base      \
		--exec-batch ls -t          \
	| fzf	--preview "brv -m $base/{}" \
		--preview-window "down,8"   \
		--bind "enter:execute(brv $base/{})+accept" > /dev/null
end

Save as ~/.config/fish/functions/epub.fish to make it persist in fish.

Clone this wiki locally