-/* $OpenBSD: cmd-queue.c,v 1.15 2014/01/09 13:46:12 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.16 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
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, ...)
-/* $OpenBSD: cmd-run-shell.c,v 1.24 2013/10/10 12:00:22 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.25 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
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
-/* $OpenBSD: cmd-select-layout.c,v 1.21 2013/10/10 12:00:22 nicm Exp $ */
+/* $OpenBSD: cmd-select-layout.c,v 1.22 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
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);
}
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);
}
return (CMD_RETURN_ERROR);
}
server_redraw_window(wl->window);
- cmdq_info(cmdq, "arranging in: %s", layoutname);
}
return (CMD_RETURN_NORMAL);
}
-/* $OpenBSD: cmd-set-option.c,v 1.67 2014/04/17 07:51:38 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.68 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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);
}
}
options_remove(oo, oe->name);
- if (!args_has(args, 'q'))
- cmdq_info(cmdq, "unset option: %s", oe->name);
return (0);
}
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");
}
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);
}
-/* $OpenBSD: cmd-switch-client.c,v 1.20 2014/02/12 20:26:13 nicm Exp $ */
+/* $OpenBSD: cmd-switch-client.c,v 1.21 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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');
-/* $OpenBSD: key-bindings.c,v 1.39 2013/03/24 09:57:59 nicm Exp $ */
+/* $OpenBSD: key-bindings.c,v 1.40 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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;
}
-/* $OpenBSD: options-table.c,v 1.47 2014/04/17 07:36:45 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.48 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
{ .name = "quiet",
.type = OPTIONS_TABLE_FLAG,
- .default_num = 0 /* overridden in main() */
+ .default_num = 0
},
{ .name = "set-clipboard",
-.\" $OpenBSD: tmux.1,v 1.389 2014/04/17 07:51:38 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.390 2014/04/17 07:55:43 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
.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
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
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
-/* $OpenBSD: tmux.c,v 1.130 2014/03/31 21:42:45 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.131 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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";
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) {
label = xstrdup(optarg);
break;
case 'q':
- quiet = 1;
break;
case 'S':
free(path);
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);
-/* $OpenBSD: tmux.h,v 1.451 2014/04/17 07:36:45 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.452 2014/04/17 07:55:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
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 *);