From 90d42de2ba829cf77e94c7f5b5c2bf88eb1fd922 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Mon, 13 Aug 2018 21:58:02 +0100 Subject: [PATCH] added server|port repl. in gph rendering --- gosher | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gosher b/gosher index 60c2eae..2a1acfa 100755 --- a/gosher +++ b/gosher @@ -165,7 +165,8 @@ serve_index(){ rline=$(echo "$line" | tr -d '\r') case "$rline" in '['*) - line=$(echo "$rline" | sed -r -e 's/\[//g;s/\]//g;s/\|/ /g;s/ / /;') + line=$(echo "$rline" | sed -r -e 's/^\[//;s/\]$//;s/\|/ /g;s/ / /;') + line=$(echo "$line" | sed -r -e "s/server port/$HOSTNAME $PORT/") ;; t*) line=$(echo "$rline" | cut -b 2-)