diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-12-10 21:19:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2010-12-10 21:19:13 +0000 |
commit | 1a4d78c7af5826e653ae1a3c010ef2171dcdb822 (patch) | |
tree | 018b2e9fd1777e44c63e1f0d65435de0404212ad | |
parent | 286fef9b4dde28186d92beaa27fae94c7cfd692c (diff) | |
download | rtmux-1a4d78c7af5826e653ae1a3c010ef2171dcdb822.tar.gz rtmux-1a4d78c7af5826e653ae1a3c010ef2171dcdb822.tar.bz2 rtmux-1a4d78c7af5826e653ae1a3c010ef2171dcdb822.zip |
-V to report version, SF issue 3038862.
-rw-r--r-- | tmux.1 | 8 | ||||
-rw-r--r-- | tmux.c | 11 |
2 files changed, 13 insertions, 6 deletions
@@ -1,4 +1,4 @@ -.\" $Id: tmux.1,v 1.275 2010-12-10 21:05:22 nicm Exp $ +.\" $Id: tmux.1,v 1.276 2010-12-10 21:19:13 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -23,7 +23,7 @@ .Sh SYNOPSIS .Nm tmux .Bk -words -.Op Fl 28lquv +.Op Fl 28lquvV .Op Fl c Ar shell-command .Op Fl f Ar file .Op Fl L Ar socket-name @@ -198,6 +198,10 @@ and files in the current directory, where .Em PID is the PID of the server or client process. +.It Fl V +Report the +.Nm +version. .It Ar command Op Ar flags This specifies one of a set of commands used to control .Nm , @@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.225 2010-12-07 20:23:21 micahcowan Exp $ */ +/* $Id: tmux.c,v 1.226 2010-12-10 21:19:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -62,8 +62,8 @@ __dead void usage(void) { fprintf(stderr, - "usage: %s [-28lquv] [-c shell-command] [-f file] [-L socket-name]\n" - " [-S socket-path] [command [flags]]\n", + "usage: %s [-28lquvV] [-c shell-command] [-f file] " + " [-L socket-name][-S socket-path] [command [flags]]\n", __progname); exit(1); } @@ -243,7 +243,7 @@ main(int argc, char **argv) quiet = flags = 0; label = path = NULL; login_shell = (**argv == '-'); - while ((opt = getopt(argc, argv, "28c:df:lL:qS:uUv")) != -1) { + while ((opt = getopt(argc, argv, "28c:df:lL:qS:uUvV")) != -1) { switch (opt) { case '2': flags |= IDENTIFY_256COLOURS; @@ -258,6 +258,9 @@ main(int argc, char **argv) xfree(shell_cmd); shell_cmd = xstrdup(optarg); break; + case 'V': + printf("%s %s\n", __progname, BUILD); + exit(0); case 'f': if (cfg_file != NULL) xfree(cfg_file); |