commit efcb20ecc7e3281bae19b94ee7e21f75b3dea9f6
parent 88d76dab85b57af3cdcdf904da5f023609568921
Author: Brian Mayer <bleemayer@gmail.com>
Date: Tue, 1 Aug 2023 12:21:21 -0300
Merge pull request #37 from rnwgnr/main
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="";;