diff options
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -26,7 +26,6 @@ #include <getopt.h> #include <langinfo.h> #include <locale.h> -#include <paths.h> #include <pwd.h> #include <stdlib.h> #include <string.h> @@ -54,7 +53,7 @@ static __dead void usage(void) { fprintf(stderr, - "usage: %s [-2Cluv] [-c shell-command] [-f file] [-L socket-name]\n" + "usage: %s [-2CluvV] [-c shell-command] [-f file] [-L socket-name]\n" " [-S socket-path] [command [flags]]\n", getprogname()); exit(1); @@ -209,7 +208,7 @@ main(int argc, char **argv) flags = 0; label = path = NULL; - while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) { + while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUVv")) != -1) { switch (opt) { case '2': flags |= CLIENT_256COLOURS; @@ -224,6 +223,9 @@ main(int argc, char **argv) else flags |= CLIENT_CONTROL; break; + case 'V': + printf("%s %s\n", getprogname(), VERSION); + exit(0); case 'f': set_cfg_file(optarg); break; @@ -256,9 +258,11 @@ main(int argc, char **argv) if (shellcmd != NULL && argc != 0) usage(); +#ifdef __OpenBSD__ if (pledge("stdio rpath wpath cpath flock fattr unix getpw sendfd " "recvfd proc exec tty ps", NULL) != 0) err(1, "pledge"); +#endif /* * tmux is a UTF-8 terminal, so if TMUX is set, assume UTF-8. @@ -332,5 +336,5 @@ main(int argc, char **argv) free(label); /* Pass control to the client. */ - exit(client_main(event_init(), argc, argv, flags, shellcmd)); + exit(client_main(osdep_event_init(), argc, argv, flags, shellcmd)); } |