case "$mime" in
text/gemini)
- lfn | typeset_gemini | less -R
- ;;
- text/*)
- lfn
- # TODO: use less with linking and stuff
- # less -R -p'^=>' +g
+ lc="/tmp/bollux-currentpage.gmi" # link copy
+ lfn | typeset_gemini | tee "$lc" | less -R ||
+ cat "$lc" # TODO list out links on success
# lesskey:
- # l /=>\n # highlight links
- # o pipe \n open_url # open the link on the top line
- # u shell select_url % # shows a selection prompt for all urls (on screen? file?)
- # Q exit 1 # for one of these, show a selection prompt for urls
- # q exit 0 # for the other, just quit
- ###
- # also look into the prompt, the filename, and input preprocessor
- # ($LESSOPEN, $LESSCLOSE)
+ # o #> Open a link (quit 1)
+ # q #> Quit (quit 0)
+ # cf. also prompt & filename
;;
+ text/*) lfn ;;
*) download "$URL" ;;
esac
}