about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-05-24 00:26:02 -0500
committerCase Duckworth2020-05-24 00:26:02 -0500
commita490c43b3d5aaea726fb688cea61b52f5079d1c8 (patch)
treeea1d32e3f9827d3407fda37b437b14fabe174e0c
parentUpdate display() to use less and better mimetypes (diff)
downloadbollux-a490c43b3d5aaea726fb688cea61b52f5079d1c8.tar.gz
bollux-a490c43b3d5aaea726fb688cea61b52f5079d1c8.zip
Add tee to prepare for links
-rwxr-xr-xbollux21
1 files 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
308 308
309 case "$mime" in 309 case "$mime" in
310 text/gemini) 310 text/gemini)
311 lfn | typeset_gemini | less -R 311 lc="/tmp/bollux-currentpage.gmi" # link copy
312 ;; 312 lfn | typeset_gemini | tee "$lc" | less -R ||
313 text/*) 313 cat "$lc" # TODO list out links on success
314 lfn
315 # TODO: use less with linking and stuff
316 # less -R -p'^=>' +g
317 # lesskey: 314 # lesskey:
318 # l /=>\n # highlight links 315 # o #> Open a link (quit 1)
319 # o pipe \n open_url # open the link on the top line 316 # q #> Quit (quit 0)
320 # u shell select_url % # shows a selection prompt for all urls (on screen? file?) 317 # cf. also prompt & filename
321 # Q exit 1 # for one of these, show a selection prompt for urls
322 # q exit 0 # for the other, just quit
323 ###
324 # also look into the prompt, the filename, and input preprocessor
325 # ($LESSOPEN, $LESSCLOSE)
326 ;; 318 ;;
319 text/*) lfn ;;
327 *) download "$URL" ;; 320 *) download "$URL" ;;
328 esac 321 esac
329} 322}