summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-01-17 16:17:42 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-01-17 16:17:42 +0000
commit478b033c5d8589ae0130378cc620e9344c9d59af (patch)
treebbb71dc0d4a18a081bb39effd1c122b94b1c2e6d /usr.bin/tmux/tmux.c
parentf88988a59b357d87a83a21be7bad123a853668ff (diff)
Add -N flag to never start server even if command would normally do so,
GitHub issue 2523.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index f9ead52c55c..518d784c1d5 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.203 2020/09/22 05:23:34 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.204 2021/01/17 16:17:41 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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':