about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--catgirl.14
-rw-r--r--chat.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/catgirl.1 b/catgirl.1
index 5412a52..213b504 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -15,7 +15,7 @@
 .Op Fl N Ar notify
 .Op Fl O Ar open
 .Op Fl S Ar bind
-.Op Fl T Ar timestamp
+.Op Fl T Ns Op Ar timestamp
 .Op Fl a Ar plain
 .Op Fl c Ar cert
 .Op Fl h Ar host
@@ -188,7 +188,7 @@ Bind to source address
 .Ar host
 when connecting to the server.
 .
-.It Fl T Ar format | Cm timestamp Op = Ar format
+.It Fl T Ns Oo Ar format Oc | Cm timestamp Op = Ar format
 Show timestamps by default,
 in the specified
 .Xr strftime 3
diff --git a/chat.c b/chat.c
index 3f6aa71..09d0ca6 100644
--- a/chat.c
+++ b/chat.c
@@ -190,10 +190,11 @@ int main(int argc, char *argv[]) {
 		{ .val = 'w', .name = "pass", required_argument },
 		{0},
 	};
-	char opts[2 * ARRAY_LEN(options)];
+	char opts[3 * ARRAY_LEN(options)];
 	for (size_t i = 0, j = 0; i < ARRAY_LEN(options); ++i) {
 		opts[j++] = options[i].val;
-		if (options[i].has_arg) opts[j++] = ':';
+		if (options[i].has_arg != no_argument) opts[j++] = ':';
+		if (options[i].has_arg == optional_argument) opts[j++] = ':';
 	}
 
 	for (int opt; 0 < (opt = getopt_config(argc, argv, opts, options, NULL));) {
-08-04Add Conversations With FriendsJune McEnroe 2022-07-30Add Normal PeopleJune McEnroe 2022-07-26Rewrite glitch from new pngoJune McEnroe 2022-07-26Update Care with time-to-ID and piercingsJune McEnroe 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe 2022-07-03Add The Bone Shard EmperorJune McEnroe 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe