.BI [ \[char34]x ]Y
Yank the current selection into register \fIx\fP and clipboard.
.SH COMMAND MODE
+Commands or ex-commands can be fired from vimb's inputbox, from config file or
+by autocmd. If commands are started from inputbox, they must be prefixed by
+`:'. In case of config file or autocmd the leading colon can be omitted.
+
+Commands that are typed interactive (from inputbox or from fifo) are normally
+recorded into command history and register. To avoid this, the commands can be
+prefixed by one or more additional `:' or whitespace.
.SS Command Line Editing
.TP
.B <Esc>, CTRL\-[, CTRL-C
} info = {'\0', PHASE_START};
static void input_activate(void);
-static gboolean parse(const char **input, ExArg *arg);
+static gboolean parse(const char **input, ExArg *arg, gboolean *nohist);
static gboolean parse_count(const char **input, ExArg *arg);
static gboolean parse_command_name(const char **input, ExArg *arg);
static gboolean parse_bang(const char **input, ExArg *arg);
{
/* copy to have original command for history */
const char *in = input;
+ gboolean nohist = false;
VbCmdResult res = VB_CMD_ERROR;
ExArg *arg = g_slice_new0(ExArg);
arg->lhs = g_string_new("");
arg->rhs = g_string_new("");
while (in && *in) {
- if (!parse(&in, arg) || !(res = execute(arg))) {
+ if (!parse(&in, arg, &nohist) || !(res = execute(arg))) {
break;
}
}
- history_add(HISTORY_COMMAND, input, NULL);
- vb_register_add(':', input);
+ if (!nohist) {
+ history_add(HISTORY_COMMAND, input, NULL);
+ vb_register_add(':', input);
+ }
free_cmdarg(arg);
/**
* Parses given input string into given ExArg pointer.
*/
-static gboolean parse(const char **input, ExArg *arg)
+static gboolean parse(const char **input, ExArg *arg, gboolean *nohist)
{
if (!*input || !**input) {
return false;
/* remove leading whitespace and : */
while (**input && (**input == ':' || VB_IS_SPACE(**input))) {
(*input)++;
+ /* Command started with additional ':' or whitespce - don't record it
+ * in history or registry. */
+ *nohist = true;
}
parse_count(input, arg);