astro

a POSIX shell compatible gemini client (mirror of https://github.com/blmayer/astro)
git clone https://git.clttr.info/astro.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 8bc1114d9a2227978776b395ea9282041228aa7d
parent efcb20ecc7e3281bae19b94ee7e21f75b3dea9f6
Author: b <git@mail.blmayer.dev>
Date:   Tue,  1 Aug 2023 12:42:13 -0300

Adjusted link numbers

Diffstat:
Mastro | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/astro b/astro @@ -173,7 +173,6 @@ parseurl() { } typesetgmi() { - linkcount=1 while IFS='' read -r line do line="$(echo "$line" | tr -d '\r')" @@ -195,13 +194,13 @@ typesetgmi() { "=>"*) link="$(echo "$line" | sed -e 's/^=> *\(\S\+\)\(\s*.*\)/\1 \2/g')" echo "$link" >> "$linksfile" + linkcount=$((linkcount+1)) # shellcheck disable=SC2086 line="$(echo $link | cut -d' ' -f2-)" [ -z "$line" ] && line="$link" sty="$sty_linkt" - line="$sty_linkb$linkcount>$sty_linkt $line" - linkcount=$((linkcount+1)) + line="$sty_linkb$linkcount =>$sty_linkt $line" ;; '* '*) sty="" && line=" $sty_listb•$sty_listt$(echo "$line" | cut -c 2-)";; *) sty="";;