From a490c43b3d5aaea726fb688cea61b52f5079d1c8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 24 May 2020 00:26:02 -0500 Subject: Add tee to prepare for links --- bollux | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/bollux b/bollux index 7711dd6..7f7459c 100755 --- a/bollux +++ b/bollux @@ -308,22 +308,15 @@ display() { # display META < DOCUMENT 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 } -- cgit 1.4.1-21-gabe81