ref: e8d5a68215de837b1dcef223fbcfbeeb70c2e3e8
parent: 248f28e276561aef4fca57bb9860bedea56f5367
author: Sigrid Haflínudóttir <[email protected]>
date: Mon May 18 12:32:36 EDT 2020
remove "prev url" and add info on history to the readme
--- a/README.md
+++ b/README.md
@@ -20,7 +20,8 @@
## Installation
-Clone the repo, `mk install`. Add a plumb rule to `$home/lib/plumbing`:
+Clone the repo, `mk install`. Add a plumb rule to `$home/lib/plumbing`
+right before `include basic` line:
```
type is text
@@ -27,4 +28,18 @@
data matches 'gemini://[^ ]+'
plumb to gemini
plumb client window gemnine -w $0
+```
+
+Then updated the current rules:
+
+```
+cp $home/lib/plumbing /mnt/plumb/rules
+```
+
+## Link history
+
+While browsing, one might want to have a separate window with all the links followed:
+
+```
+while(){ syscall -o read 0 buf 512 </mnt/plumb/gemini >[2]/dev/null | tail -1 }
```
--- a/main.c
+++ b/main.c
@@ -298,7 +298,7 @@
main(int argc, char **argv)
{
Response *r;
- char *s, *t, *u, *url, *prevurl;
+ char *s, *t, *u, *url;
int len, wait, pl, fd;
Plumbmsg *m;
Biobuf out, body;
@@ -319,7 +319,6 @@
quotefmtinstall();
Binit(&out, 1, OWRITE);
pl = -1;
- prevurl = nil;
nexturl:
url = nil;
@@ -388,10 +387,6 @@
}
free(s);
}
- if(prevurl != nil){
- Bprint(&out, "\nPrevious: %s\n", prevurl);
- free(prevurl);
- }
}
freeresponse(r);
}else{
@@ -401,7 +396,6 @@
}
Bflush(&out);
- prevurl = url;
if(wait)
goto nexturl;