Skip to content

Commit

Permalink
Improved relative link nav
Browse files Browse the repository at this point in the history
Fixed print on POSIX shell
  • Loading branch information
blmayer committed Jul 27, 2021
1 parent af69669 commit ddb79dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion astro
Expand Up @@ -71,6 +71,7 @@ fetch() {
# Some setup first
cols=$(tput cols)
width=$((cols - (2*margin)))
[ "$debug" ] && echo "Text width: $width" >&2

[ "$debug" ] && echo "Requesting $1://$2:$3/$4$5" >&2
echo "$1://$2:$3/$4$5" | openssl s_client \
Expand Down Expand Up @@ -189,7 +190,7 @@ fetch() {
while IFS='' read -r txt
do
printf "%*s" "$margin" ""
echo "$sty$txt"
printf "$sty$txt\n"
done
}
fi
Expand Down Expand Up @@ -231,6 +232,7 @@ fetch() {
port="$(echo "$newurl" | cut -d' ' -f3)"
path="$(echo "$newurl" | cut -d' ' -f4)"

[ "$path" ] || path="$host"; host="$2"
[ "$host" ] || host="$2"
[ "$debug" ] && echo "Seeking link: gemini://$host:$port/$path" >&2 && sleep 1

Expand Down

0 comments on commit ddb79dd

Please sign in to comment.