diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-01-17 18:01:21 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-01-17 18:01:21 +0000 |
commit | 24c15eda793022f834fc28079f95ca71e2e2215c (patch) | |
tree | 48a01f6cbdc6680f52c7880aacc1c6b3d65b76f0 | |
parent | d4866d5fe6214064882244ddb32f05480e9d8d91 (diff) | |
parent | 71c590a37f98d82c72279eddae74f9b8be146202 (diff) | |
download | rtmux-24c15eda793022f834fc28079f95ca71e2e2215c.tar.gz rtmux-24c15eda793022f834fc28079f95ca71e2e2215c.tar.bz2 rtmux-24c15eda793022f834fc28079f95ca71e2e2215c.zip |
Merge branch 'obsd-master' into master
-rw-r--r-- | client.c | 2 | ||||
-rw-r--r-- | tmux.1 | 5 | ||||
-rw-r--r-- | tmux.c | 7 | ||||
-rw-r--r-- | tmux.h | 2 |
4 files changed, 13 insertions, 3 deletions
@@ -126,6 +126,8 @@ retry: log_debug("connect failed: %s", strerror(errno)); if (errno != ECONNREFUSED && errno != ENOENT) goto failed; + if (flags & CLIENT_NOSTARTSERVER) + goto failed; if (~flags & CLIENT_STARTSERVER) goto failed; close(fd); @@ -191,6 +191,11 @@ directories are missing). Behave as a login shell. This flag currently has no effect and is for compatibility with other shells when using tmux as a login shell. +.It Fl N +Do not start the server even if the command would normally do so (for example +.Ic new-session +or +.Ic start-server ) . .It Fl S Ar socket-path Specify a full alternative path to the server socket. If @@ -53,7 +53,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); @@ -340,7 +340,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", ":,"); @@ -370,6 +370,9 @@ main(int argc, char **argv) free(label); label = xstrdup(optarg); break; + case 'N': + flags |= CLIENT_NOSTARTSERVER; + break; case 'q': break; case 'S': @@ -1636,7 +1636,7 @@ struct client { #define CLIENT_DEAD 0x200 #define CLIENT_REDRAWBORDERS 0x400 #define CLIENT_READONLY 0x800 -/* 0x1000 unused */ +#define CLIENT_NOSTARTSERVER 0x1000 #define CLIENT_CONTROL 0x2000 #define CLIENT_CONTROLCONTROL 0x4000 #define CLIENT_FOCUSED 0x8000 |