aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-02 15:38:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-02 15:38:09 +0000
commit242e69327fdedb51e2ad103432e64642dd6f38a9 (patch)
treeeef36b6b597d298d904ed7082fc9d6aa9a8ee2b1
parent4fbbc3dfd3fd6b26213c52af780fd41a86814b9f (diff)
downloadrtmux-242e69327fdedb51e2ad103432e64642dd6f38a9.tar.gz
rtmux-242e69327fdedb51e2ad103432e64642dd6f38a9.tar.bz2
rtmux-242e69327fdedb51e2ad103432e64642dd6f38a9.zip
Meta meta command.
-rw-r--r--TODO2
-rw-r--r--client-cmd.c17
2 files changed, 16 insertions, 3 deletions
diff --git a/TODO b/TODO
index 4289f8a5..d479eb48 100644
--- a/TODO
+++ b/TODO
@@ -21,7 +21,7 @@
- figure out once and for all what is going on with backspace and del
- deal properly with ambiguous ops... list-sessions & list-windows
- keys to add:
- meta-meta : pass through meta (will need this...)
+ NONE?
- commands to add:
rename sessions
swap windows
diff --git a/client-cmd.c b/client-cmd.c
index 2d98d02d..62c84978 100644
--- a/client-cmd.c
+++ b/client-cmd.c
@@ -1,4 +1,4 @@
-/* $Id: client-cmd.c,v 1.6 2007-09-30 13:02:14 nicm Exp $ */
+/* $Id: client-cmd.c,v 1.7 2007-10-02 15:38:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -22,9 +22,10 @@
int client_cmd_prefix = META;
+int client_cmd_fn_msg(int, struct client_ctx *, char **);
int client_cmd_fn_select(int, struct client_ctx *, char **);
int client_cmd_fn_detach(int, struct client_ctx *, char **);
-int client_cmd_fn_msg(int, struct client_ctx *, char **);
+int client_cmd_fn_meta(int, struct client_ctx *, char **);
struct cmd {
int key;
@@ -59,6 +60,7 @@ struct cmd client_cmd_table[] = {
{ 'w', client_cmd_fn_msg, MSG_WINDOWLIST },
{ 'I', client_cmd_fn_msg, MSG_WINDOWINFO },
{ 'i', client_cmd_fn_msg, MSG_WINDOWINFO },
+ { META, client_cmd_fn_meta, 0 },
};
#define NCLIENTCMD (sizeof client_cmd_table / sizeof client_cmd_table[0])
@@ -104,3 +106,14 @@ client_cmd_fn_detach(
{
return (-1);
}
+
+/* Handle meta command. */
+int
+client_cmd_fn_meta(unused int arg, struct client_ctx *cctx, unused char **error)
+{
+ uint8_t key = META;
+
+ client_write_server(cctx, MSG_INPUT, &key, sizeof key);
+
+ return (0);
+}