summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-01-24 19:59:20 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-01-24 19:59:20 +0000
commitcea615e27d7a1501fa98c04c7b5abe6714624cbf (patch)
treebb37a2e2841c3c60d7081abd710822c68a9c9155 /usr.bin
parent80107f99da3b67201c712344950c91128c136b23 (diff)
server-info can become an alias rather than a command.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-show-messages.c17
-rw-r--r--usr.bin/tmux/cmd.c4
-rw-r--r--usr.bin/tmux/options-table.c7
3 files changed, 9 insertions, 19 deletions
diff --git a/usr.bin/tmux/cmd-show-messages.c b/usr.bin/tmux/cmd-show-messages.c
index be066f0dd05..62df9241131 100644
--- a/usr.bin/tmux/cmd-show-messages.c
+++ b/usr.bin/tmux/cmd-show-messages.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-messages.c,v 1.23 2016/10/16 19:04:05 nicm Exp $ */
+/* $OpenBSD: cmd-show-messages.c,v 1.24 2017/01/24 19:59:19 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -45,17 +45,6 @@ const struct cmd_entry cmd_show_messages_entry = {
.exec = cmd_show_messages_exec
};
-const struct cmd_entry cmd_server_info_entry = {
- .name = "server-info",
- .alias = "info",
-
- .args = { "", 0, 0 },
- .usage = "",
-
- .flags = CMD_AFTERHOOK,
- .exec = cmd_show_messages_exec
-};
-
static int cmd_show_messages_terminals(struct cmdq_item *, int);
static int cmd_show_messages_jobs(struct cmdq_item *, int);
@@ -109,11 +98,11 @@ cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
int done, blank;
done = blank = 0;
- if (args_has(args, 'T') || self->entry == &cmd_server_info_entry) {
+ if (args_has(args, 'T')) {
blank = cmd_show_messages_terminals(item, blank);
done = 1;
}
- if (args_has(args, 'J') || self->entry == &cmd_server_info_entry) {
+ if (args_has(args, 'J')) {
cmd_show_messages_jobs(item, blank);
done = 1;
}
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index b38ff48abeb..b6853b9b60e 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.135 2017/01/24 19:53:37 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.136 2017/01/24 19:59:19 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -93,7 +93,6 @@ extern const struct cmd_entry cmd_select_pane_entry;
extern const struct cmd_entry cmd_select_window_entry;
extern const struct cmd_entry cmd_send_keys_entry;
extern const struct cmd_entry cmd_send_prefix_entry;
-extern const struct cmd_entry cmd_server_info_entry;
extern const struct cmd_entry cmd_set_buffer_entry;
extern const struct cmd_entry cmd_set_environment_entry;
extern const struct cmd_entry cmd_set_hook_entry;
@@ -182,7 +181,6 @@ const struct cmd_entry *cmd_table[] = {
&cmd_select_window_entry,
&cmd_send_keys_entry,
&cmd_send_prefix_entry,
- &cmd_server_info_entry,
&cmd_set_buffer_entry,
&cmd_set_environment_entry,
&cmd_set_hook_entry,
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index 52fc4f3c249..bb962231573 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.83 2017/01/24 19:53:37 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.84 2017/01/24 19:59:19 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -69,7 +69,10 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_ARRAY,
.scope = OPTIONS_TABLE_SERVER,
.default_str = "split-pane=split-window,"
- "splitp=split-window"
+ "splitp=split-window,"
+ "server-info=show-messages -JT,"
+ "info=show-messages -JT",
+ .separator = ","
},
{ .name = "default-terminal",