mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-24 11:56:10 +02:00
Meta meta command.
This commit is contained in:
17
client-cmd.c
17
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user