README.md: add maintenance notice
gmnlm: treat invalid cert and cert mismatch similarly
gmnlm already allows overriding invalid cert error, so it makes little
sense not to allow the same for cert mismatch one. I have also reversed
the offered options for both to reflect the suggested course of action
and added a warning for invalid cert as the possibility of MitM is quite
similar to cert mismatch.
gmnlm: make ./ prefix mandatory for relative URLs
Interpreting everything that isn't a command as relative URL wasn't
very intuitive and lead to accidental commands or requests being made.
This commit aims to clearly separate relative URLs from commands, which
also allows us to add basic error reporting for commands.
The only exception that had to be made was in regards to /whatever URLs
as those are impossible to support without changing the search command.
gmnlm: prompt for redirects, make max redirects configurable
Redirects are currently the most reliable way of tracking users in
geminispace. To mitigate this, similar approach as used with server
certificates is adopted -- users are prompted by default, but this
can be easily overriden with a command line flag if convenience is
preferred to tracking-resistance.
gmnlm: tidy up help message
* make marking of mandatory arguments consistent
* document the 'i' command
* don't document commands explained by the prompt
* unify alignment
* minor wording adjustments
gmnlm: don't assume everything starting with b/f is b/f command
It was impossible to enter a file:// URL because it got interpreted
as a 'f' command without any warning about invalid argument. The same
thing happened with relative addresses beginning with 'b' or 'f'.
gmnlm: save non-sensitive input requests in history
Currently, followup requests to both INPUT and SENSITIVE INPUT responses are
omitted from history. However, the intended use of INPUT is for searching, and
there is SENSITIVE INPUT for sensitive information, so omitting regular INPUT
from history doesn't make much sense and only makes searching annoying as one
needs to re-enter the query when going back.
Add d[N] to download Nth link
I wanted to add an optional [N] to 'd' and '|' to download/pipe the
Nth link instead of the current page. After getting the first one done,
I found out that '|' already has this option, so I fixed the relative
help line without changing that command.
All in all I don't know how useful this patch is, considering that
'[N]|' was already there. Feel free to discard it and just keep the
gmni: fix -d truncation
Previously, the last character of the provided input would not be read.
For example, `gmni -d termfmt gemini://godocs.io/-/search` would search
gmnlm: fix memory leak in do_requests
gmnlm: strip control sequences from plaintext rendering
gmnlm: d <path> -> d [path]
The argument is optional, the 'd' command works without it.
gmnlm: add optional custom bookmark titles
It is often useful to title a bookmark differently from how the page's
author titled it.
gmnlm: output newline when quiting via Control-D
It is common practice to quit programs reading from stdin by sending
EOF to their input. This commit ensures such an exit is functionally
equivalent to a regular exit via the 'q' command.
gmnlm: update usage to match man page
clear client certificate when none is required
Otherwise we end up using the client certificate
of a previous request and the current request will
fail with a SSL error 26.
fix wrong path length check and error message
allow ~ as home alias in file path for downloads
This works for gmni and gmnlm respectively.