From 71c590a37f98d82c72279eddae74f9b8be146202 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 17 Jan 2021 16:17:41 +0000 Subject: Add -N flag to never start server even if command would normally do so, GitHub issue 2523. --- tmux.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index b7fc5121..5861e66b 100644 --- a/tmux.c +++ b/tmux.c @@ -57,7 +57,7 @@ static __dead void usage(void) { fprintf(stderr, - "usage: %s [-2CDluvV] [-c shell-command] [-f file] [-L socket-name]\n" + "usage: %s [-2CDlNuvV] [-c shell-command] [-f file] [-L socket-name]\n" " [-S socket-path] [-T features] [command [flags]]\n", getprogname()); exit(1); @@ -350,7 +350,7 @@ main(int argc, char **argv) if (**argv == '-') flags = CLIENT_LOGIN; - while ((opt = getopt(argc, argv, "2c:CDdf:lL:qS:T:uUvV")) != -1) { + while ((opt = getopt(argc, argv, "2c:CDdf:lL:NqS:T:uUvV")) != -1) { switch (opt) { case '2': tty_add_features(&feat, "256", ":,"); @@ -380,6 +380,9 @@ main(int argc, char **argv) free(label); label = xstrdup(optarg); break; + case 'N': + flags |= CLIENT_NOSTARTSERVER; + break; case 'q': break; case 'S': -- cgit v1.2.3