From 1e85a6f6bead45f2a67e9bf1a0e438d9e6e74bac Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Mon, 18 Nov 2024 03:22:49 +0100 Subject: [PATCH] Add page command to make long menus/content readable I'm on a roll tonight! --- gc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gc b/gc index aa84de2..ec81bdc 100755 --- a/gc +++ b/gc @@ -57,7 +57,7 @@ graburl() { ui() { while [ -n "$URL" ]; do - catlike + catlike | tee "$BUF" URL="" while true; do @@ -68,11 +68,13 @@ ui() { l*) cat "$LINKS" ;; g*) goto ; break ;; u*) goback ; break ;; + p*) ${PAGER:-less} "$BUF" ;; H*) cat "$HISTORY" ;; h*) cat < "$HISTORY" if ! tty >/dev/null; then @@ -96,4 +99,4 @@ else ui fi -rm -f "$LINKS" "$HISTORY" +rm -f "$LINKS" "$HISTORY" "$BUF" -- libgit2 1.8.1