dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit c0c9f0f926eb8e146a443d08a7c0b0443e5165ab
parent 9f3177df0bd581b402504aa873fb1a1a336a6d7f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  3 Jul 2020 11:16:40 +0200

Use PAGER for paging, recognize more plaintext types

Diffstat:
M.local/bin/plumb | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -141,7 +141,7 @@ handle_target() { if [ "$(file -b "$t")" = "vCalendar calendar file" ]; then handle_calendar_invite "$t" else - termopen less "$t" + termopen $PAGER "$t" fi;; *shellscript*) $EDITOR "$t";; @@ -211,9 +211,9 @@ handle_target() { cd /tmp && detach comic "$t" elif regexmatch "$t" '^doi.*10\.[0-9]*\/'; then detach $prefix $BROWSER "https://doi.org/${t}" - elif regexmatch "$t" '\.(txt|patch|diff|rst|md)$'; then + elif regexmatch "$t" '\.(txt|patch|diff|rst|md|vtt|vtv)$'; then f="$(fetch "$t")" - termopen less "$f" + termopen $PAGER "$f" elif regeximatch "$t" '^gopher://'; then termopen $prefix sacc "$t" elif regexmatch "$t" '[A-z]\.[0-9]$'; then