print_len = strlen (to_print);
end = to_print + print_len + 1;
memset (&ps, 0, sizeof (mbstate_t));
+#else
+ print_len = strlen (to_print);
#endif
printed_len = common_prefix_len = 0;
@item operate-and-get-next (C-o)
Accept the current line for execution and fetch the next line
-relative to the current line from the history for editing. Any
-argument is ignored.
+relative to the current line from the history for editing.
+A numeric argument, if supplied, specifies the history entry to use instead
+of the current line.
@item edit-and-execute-command (C-x C-e)
Invoke an editor on the current command line, and execute the result as shell
@set EDITION 7.0
@set VERSION 7.0
-@set UPDATED 21 April 2017
-@set UPDATED-MONTH April 2017
+@set UPDATED 4 July 2017
+@set UPDATED-MONTH July 2017
-@set LASTCHANGE Fri Apr 21 15:25:17 EDT 2017
+@set LASTCHANGE Tue Jul 4 16:32:48 EDT 2017
}
r = _rl_arg_dispatch (cxt, c);
+ if (r > 0)
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
return (r != 1);
}
rl_cleanup_after_signal ();
#if defined (HAVE_POSIX_SIGNALS)
+# if defined (SIGTSTP)
/* Unblock SIGTTOU blocked above */
if (sig == SIGTTIN || sig == SIGTSTP)
sigprocmask (SIG_UNBLOCK, &set, (sigset_t *)NULL);
+# endif
sigemptyset (&set);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
static int
_rl_insert_next_callback (_rl_callback_generic_arg *data)
{
- int count;
+ int count, r;
count = data->count;
+ r = 0;
+
+ if (count < 0)
+ {
+ data->count++;
+ r = _rl_insert_next (1);
+ _rl_want_redisplay = 1;
+ /* If we should keep going, leave the callback function installed */
+ if (data->count < 0 && r == 0)
+ return r;
+ count = 0; /* data->count == 0 || r != 0; force break below */
+ }
/* Deregister function, let rl_callback_read_char deallocate data */
_rl_callback_func = 0;
_rl_want_redisplay = 1;
-
+
+ if (count == 0)
+ return r;
+
return _rl_insert_next (count);
}
#endif
return (0);
}
#endif
-
+
+ /* A negative count means to quote the next -COUNT characters. */
+ if (count < 0)
+ {
+ int r;
+
+ do
+ r = _rl_insert_next (1);
+ while (r == 0 && ++count < 0);
+ return r;
+ }
+
return _rl_insert_next (count);
}