blob: 7519b0d0956d388833cc3e504265d3f883d7653e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
gmi100 (Gemini CLI protocol client written in 100 lines of ANSI C)
I tried to pack as much as possible in 100 lines of ANSI C. Initially
I struggled to fit simple TLS connection in such small space but
eventually I ended up with CLI client capable of efficient navigation
between capsules of Gemini space.
Useful function for .profile:
```
gmi100() {
trap : INT
\rm /tmp/file?????? &>/dev/null
cd && /usr/bin/gmi100 "$@"
cd - 1>/dev/null
trap INT
}
```
Explaining:
* Ignore SIGINT - keyboard interrupt (\C-c);
* Remove "temp files"¹ of gmi100;
* 'cd' without parameter refer to "HOME shell variable"²;
* 'cd -' goes to last directory that you stayed.
¹ all that is opened with gmi100 client
² see dash(1) or bash(1)
summa summarum: this function will does save history of gmi100 on $HOME
directory, no matter where it is running from.
|