zygo

ncurses gopher client
Log | Files | Refs

commit 596edfc140b8083e78e110999d4b0116340d17f8
parent 6d62a876c40a885b373144952d15344ec82dcf6b
Author: hhvn <dev@hhvn.uk>
Date:   Mon, 17 Jan 2022 19:11:18 +0000

zygo.c zygo.1: plumber settings via flags

Diffstat:
Mzygo.1 | 7++++++-
Mzygo.c | 15++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/zygo.1 b/zygo.1 @@ -34,11 +34,16 @@ and has pager functionality using ncurses. supports gopher over tls, although it may be buggy. The user may attempt to downgrade any tls connection if it fails. .Sh OPTIONS -.Bl -compact -tag +.Bl -compact -tag -width "-p plumber" .It Fl v Print version info. .It Fl k Turn off certificate checking for TLS. +.It Fl p Ar plumber +Set the plumber to +.Ar plumber "." +.It Fl P +Do not wait for the plumber to exit. .Sh INPUT .Nm is constantly reading input. diff --git a/zygo.c b/zygo.c @@ -992,7 +992,7 @@ sighandler(int signal) { void usage(char *argv0) { - fprintf(stderr, "usage: %s [-kv] [uri]\n", basename(argv0)); + fprintf(stderr, "usage: %s [-kPv] [-p plumber] [uri]\n", basename(argv0)); exit(EXIT_FAILURE); } @@ -1032,6 +1032,19 @@ main(int argc, char *argv[]) { error("TLS support not compiled"); #endif /* TLS */ break; + case 'p': + if (*(s+1)) { + plumber = s + 1; + s += strlen(s) - 1; + } else if (i + 1 != argc) { + plumber = argv[++i]; + } else { + usage(argv[0]); + } + break; + case 'P': + parallelplumb = 1; + break; case 'v': fprintf(stderr, "zygo %s\n", COMMIT); exit(EXIT_SUCCESS);