commit 8f81493ece4c2eb3393a995179d6b3225cfc5357
parent 88d76dab85b57af3cdcdf904da5f023609568921
Author: René Wagner <rwa@clttr.info>
Date: Tue, 1 Aug 2023 08:14:52 +0200
add link counter to rendered output for easier navigation
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/astro b/astro
@@ -173,7 +173,7 @@ parseurl() {
}
typesetgmi() {
- i=1
+ linkcount=1
while IFS='' read -r line
do
line="$(echo "$line" | tr -d '\r')"
@@ -200,7 +200,8 @@ typesetgmi() {
line="$(echo $link | cut -d' ' -f2-)"
[ -z "$line" ] && line="$link"
sty="$sty_linkt"
- line="$sty_linkb=>$sty_linkt $line"
+ line="$sty_linkb$linkcount>$sty_linkt $line"
+ linkcount=$((linkcount+1))
;;
'* '*) sty="" && line=" $sty_listb•$sty_listt$(echo "$line" | cut -c 2-)";;
*) sty="";;