summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-06-18 15:23:01 +0000
committerTiago Cunha <tcunha@gmx.com>2012-06-18 15:23:01 +0000
commit0159c74a32dabec337334252121d5d2a060adc21 (patch)
treeff4ae385fa98562285e484af2b2c66a619dc3577 /tmux.c
parenta401420273490717de3f6fe8f7f0915692be72a3 (diff)
Sync OpenBSD patchset 1138:
Add a skeleton mode to tmux (called "control mode") that let's tmux commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tmux.c b/tmux.c
index 3f5e6cdf..5d8bbb09 100644
--- a/tmux.c
+++ b/tmux.c
@@ -244,7 +244,7 @@ main(int argc, char **argv)
quiet = flags = 0;
label = path = NULL;
login_shell = (**argv == '-');
- while ((opt = getopt(argc, argv, "28c:df:lL:qS:uUvV")) != -1) {
+ while ((opt = getopt(argc, argv, "28c:Cdf:lL:qS:uUvV")) != -1) {
switch (opt) {
case '2':
flags |= IDENTIFY_256COLOURS;
@@ -259,6 +259,12 @@ main(int argc, char **argv)
xfree(shell_cmd);
shell_cmd = xstrdup(optarg);
break;
+ case 'C':
+ if (flags & IDENTIFY_CONTROL)
+ flags |= IDENTIFY_TERMIOS;
+ else
+ flags |= IDENTIFY_CONTROL;
+ break;
case 'V':
printf("%s %s\n", __progname, VERSION);
exit(0);