diff options
-rw-r--r-- | cmd-queue.c | 31 | ||||
-rw-r--r-- | cmd-run-shell.c | 10 | ||||
-rw-r--r-- | cmd-select-layout.c | 3 | ||||
-rw-r--r-- | cmd-set-option.c | 12 | ||||
-rw-r--r-- | cmd-switch-client.c | 7 | ||||
-rw-r--r-- | key-bindings.c | 2 | ||||
-rw-r--r-- | options-table.c | 2 | ||||
-rw-r--r-- | tmux.1 | 12 | ||||
-rw-r--r-- | tmux.c | 9 | ||||
-rw-r--r-- | tmux.h | 1 |
10 files changed, 12 insertions, 77 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index caa80afe..7bc154a0 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -86,37 +86,6 @@ cmdq_print(struct cmd_q *cmdq, const char *fmt, ...) va_end(ap); } -/* Show info from command. */ -void printflike2 -cmdq_info(struct cmd_q *cmdq, const char *fmt, ...) -{ - struct client *c = cmdq->client; - va_list ap; - char *msg; - - if (options_get_number(&global_options, "quiet")) - return; - - va_start(ap, fmt); - - if (c == NULL) - /* nothing */; - else if (c->session == NULL || (c->flags & CLIENT_CONTROL)) { - evbuffer_add_vprintf(c->stdout_data, fmt, ap); - - evbuffer_add(c->stdout_data, "\n", 1); - server_push_stdout(c); - } else { - xvasprintf(&msg, fmt, ap); - *msg = toupper((u_char) *msg); - status_message_set(c, "%s", msg); - free(msg); - } - - va_end(ap); - -} - /* Show error from command. */ void printflike2 cmdq_error(struct cmd_q *cmdq, const char *fmt, ...) diff --git a/cmd-run-shell.c b/cmd-run-shell.c index d835e461..8799e0ab 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -161,13 +161,9 @@ cmd_run_shell_callback(struct job *job) retcode = WTERMSIG(job->status); xasprintf(&msg, "'%s' terminated by signal %d", cmd, retcode); } - if (msg != NULL) { - if (lines == 0) - cmdq_info(cmdq, "%s", msg); - else - cmd_run_shell_print(job, msg); - free(msg); - } + if (msg != NULL) + cmd_run_shell_print(job, msg); + free(msg); } void diff --git a/cmd-select-layout.c b/cmd-select-layout.c index 26d8538e..a5f5519c 100644 --- a/cmd-select-layout.c +++ b/cmd-select-layout.c @@ -104,7 +104,6 @@ cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq) else layout = layout_set_previous(wl->window); server_redraw_window(wl->window); - cmdq_info(cmdq, "arranging in: %s", layout_set_name(layout)); return (CMD_RETURN_NORMAL); } @@ -115,7 +114,6 @@ cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq) if (layout != -1) { layout = layout_set_select(wl->window, layout); server_redraw_window(wl->window); - cmdq_info(cmdq, "arranging in: %s", layout_set_name(layout)); return (CMD_RETURN_NORMAL); } @@ -126,7 +124,6 @@ cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq) return (CMD_RETURN_ERROR); } server_redraw_window(wl->window); - cmdq_info(cmdq, "arranging in: %s", layoutname); } return (CMD_RETURN_NORMAL); } diff --git a/cmd-set-option.c b/cmd-set-option.c index 67eb8083..3107746c 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -259,10 +259,6 @@ cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char* optstr, return (CMD_RETURN_NORMAL); } options_set_string(oo, optstr, "%s", valstr); - if (!args_has(args, 'q')) { - cmdq_info(cmdq, "set option: %s -> %s", optstr, - valstr); - } } return (CMD_RETURN_NORMAL); } @@ -285,8 +281,6 @@ cmd_set_option_unset(struct cmd *self, struct cmd_q *cmdq, } options_remove(oo, oe->name); - if (!args_has(args, 'q')) - cmdq_info(cmdq, "unset option: %s", oe->name); return (0); } @@ -295,9 +289,7 @@ int cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { - struct args *args = self->args; struct options_entry *o; - const char *s; if (oe->type != OPTIONS_TABLE_FLAG && value == NULL) { cmdq_error(cmdq, "empty value"); @@ -337,10 +329,6 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq, } if (o == NULL) return (-1); - - s = options_table_print_entry(oe, o, 0); - if (!args_has(args, 'q')) - cmdq_info(cmdq, "set option: %s -> %s", oe->name, s); return (0); } diff --git a/cmd-switch-client.c b/cmd-switch-client.c index 99a1ae64..872570b0 100644 --- a/cmd-switch-client.c +++ b/cmd-switch-client.c @@ -71,13 +71,10 @@ cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq) return (CMD_RETURN_ERROR); if (args_has(args, 'r')) { - if (c->flags & CLIENT_READONLY) { + if (c->flags & CLIENT_READONLY) c->flags &= ~CLIENT_READONLY; - cmdq_info(cmdq, "made client writable"); - } else { + else c->flags |= CLIENT_READONLY; - cmdq_info(cmdq, "made client read-only"); - } } tflag = args_get(args, 't'); diff --git a/key-bindings.c b/key-bindings.c index 625ffddf..db48f9e7 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -212,7 +212,7 @@ key_bindings_dispatch(struct key_binding *bd, struct client *c) readonly = 0; } if (!readonly && (c->flags & CLIENT_READONLY)) { - cmdq_info(c->cmdq, "client is read-only"); + cmdq_error(c->cmdq, "client is read-only"); return; } diff --git a/options-table.c b/options-table.c index a46f5ce6..1010e84f 100644 --- a/options-table.c +++ b/options-table.c @@ -90,7 +90,7 @@ const struct options_table_entry server_options_table[] = { { .name = "quiet", .type = OPTIONS_TABLE_FLAG, - .default_num = 0 /* overridden in main() */ + .default_num = 0 }, { .name = "set-clipboard", @@ -23,7 +23,7 @@ .Sh SYNOPSIS .Nm tmux .Bk -words -.Op Fl 2lCquv +.Op Fl 2lCuv .Op Fl c Ar shell-command .Op Fl f Ar file .Op Fl L Ar socket-name @@ -168,10 +168,6 @@ server process to recreate it. Behave as a login shell. This flag currently has no effect and is for compatibility with other shells when using tmux as a login shell. -.It Fl q -Set the -.Ic quiet -server option to prevent the server sending various informational messages. .It Fl S Ar socket-path Specify a full alternative path to the server socket. If @@ -2110,12 +2106,6 @@ option. Set the number of error or information messages to save in the message log for each client. The default is 100. -.It Xo Ic quiet -.Op Ic on | off -.Xc -Enable or disable the display of various informational messages (see also the -.Fl q -command line flag). .It Xo Ic set-clipboard .Op Ic on | off .Xc @@ -206,7 +206,7 @@ main(int argc, char **argv) char in[256]; const char *home; long long pid; - int opt, flags, quiet, keys, session; + int opt, flags, keys, session; #ifdef DEBUG malloc_options = (char *) "AFGJPX"; @@ -214,7 +214,7 @@ main(int argc, char **argv) setlocale(LC_TIME, ""); - quiet = flags = 0; + flags = 0; label = path = NULL; login_shell = (**argv == '-'); while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUv")) != -1) { @@ -244,7 +244,6 @@ main(int argc, char **argv) label = xstrdup(optarg); break; case 'q': - quiet = 1; break; case 'S': free(path); @@ -291,11 +290,11 @@ main(int argc, char **argv) options_init(&global_options, NULL); options_table_populate_tree(server_options_table, &global_options); - options_set_number(&global_options, "quiet", quiet); options_init(&global_s_options, NULL); options_table_populate_tree(session_options_table, &global_s_options); - options_set_string(&global_s_options, "default-shell", "%s", getshell()); + options_set_string(&global_s_options, "default-shell", "%s", + getshell()); options_init(&global_w_options, NULL); options_table_populate_tree(window_options_table, &global_w_options); @@ -1851,7 +1851,6 @@ size_t cmd_list_print(struct cmd_list *, char *, size_t); struct cmd_q *cmdq_new(struct client *); int cmdq_free(struct cmd_q *); void printflike2 cmdq_print(struct cmd_q *, const char *, ...); -void printflike2 cmdq_info(struct cmd_q *, const char *, ...); void printflike2 cmdq_error(struct cmd_q *, const char *, ...); int cmdq_guard(struct cmd_q *, const char *, int); void cmdq_run(struct cmd_q *, struct cmd_list *); |