astro

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.clttr.info/astro.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 56075499a9ecc72b40e5e533ccd9b43b4d7de63c
parent 241aa607ad07199e5f2b3d6d6fa1de60867f2e1d
Author: Brian Mayer <bleemayer@gmail.com>
Date:   Tue, 28 Jun 2022 14:40:55 -0300

Saving parsed URLs to history file

Going back in page history no longer needs parsing.
Diffstat:
Mastro | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/astro b/astro @@ -93,7 +93,7 @@ fetch() { [ "$debug" ] && echo "Requesting $1://$2:$3/$4$5" >&2 printf '\033]2;%s\007' "astro: $2/$4" - echo "$1://$2:$3/$4$5" >> "$histfile" + echo "$1 $2 $3 $4 $5" >> "$histfile" clear certfile="" @@ -157,7 +157,7 @@ EOF url="$(getprevious)" [ "$debug" ] && echo "Previous page: $url" >&2 && sleep 2 # shellcheck disable=SC2046 - fetch $(parseurl "$url") + fetch $url return 0 ;; 52) @@ -181,7 +181,7 @@ EOF # word splitting here is intentional # shellcheck disable=SC2046 - fetch $(parseurl "$url") + fetch $url else fetch "$1" "$2" "$3" "$4" "$5" fi @@ -269,7 +269,10 @@ EOF read -r i <&1 url="$(sed "${i}q;d" "$linksfile" | cut -d' ' -f1)" ;; - 52) url="$(getprevious)" ;; + 52) + fetch $(getprevious) + return + ;; 53) url="$homepage"; shift $# ;; 54) echo "Enter description: (optional)"