This is a simple but useful Fish function. It scans your Zotero library
for PDF files that have been renamed via Zotfile, using either fd
(fast) or Unix find
(ubiquitous). It then presents these results in fzf
,
letting you fuzzy-search through the results, and choose as many hits as you want
with Tab. Press Enter to open those files in your PDF viewer.
If you use Zotero to organize your bibliography, and sometimes want to quickly open a paper without having to open the Zotero GUI program, this is for you. While I made this for use with with my Zotero library, it should work equally fine with Mendeley or any other system that places sensibly named PDF files in a searchable directory. To install this with Fisher:
fisher add jabirali/fish-zotfile
Then set the variable $zotfile_root
to the directory where Zotero stores its
PDF files. If you installed Zotero via Snap on Ubuntu, this can be done by adding
set -x zotfile_root ~/snap/zotero-snap
to your ~/.config/fish/config.fish
.
Then just type zotfile
into a Fish shell when you want to activate it.