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 473078b0c709d200992bab8e70e0ab2cf465c428
parent eb7d86f11563431575a0e273ed25bec53feab82f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 31 Mar 2020 11:15:09 +0200

Handle plain-text formats

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

diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -106,6 +106,8 @@ handle_target() { cd /tmp && detach comic "$t" elif regexmatch "$t" '10\.[0-9]*\/'; then detach $BROWSER "https://doi.org/${t}" + elif regexmatch "$t" '\.(txt|patch|diff|rst|md)$'; then + detach $TERMINAL less "$(fetch "$t")" elif regeximatch "$t" '^gopher://' || \ { regexmatch "$t" '^(0|1|3|7|9|g|I|h)' && \ [ "$(printf '%s' "$t" | awk -F'\t' '{print NF}')" -eq 4 ]; }; then