bibdot (352B)
1 #!/bin/sh 2 3 if [ $# = 1 ]; then 4 biblist-dot "$1" | dot -Tpdf | zathura - 5 exit 6 fi 7 8 [ -f "$BIB" ] || { 9 echo "No BIB=$BIB" 10 exit 1 11 } 12 13 if [ -t 0 ]; then 14 command="fzf" 15 else 16 command="dmenu -i -l 20" 17 fi 18 19 selection=$(biblist-key | $command | cut -d" " -f1) 20 21 [ -z "$selection" ] && exit 0 22 23 biblist-dot "$selection" | dot -Tpdf | zathura -