commit bash-20141031 snapshot

This commit is contained in:
Chet Ramey
2014-11-03 14:32:12 -05:00
parent e0722a04ec
commit f3aad56dce
52 changed files with 55059 additions and 2492 deletions
+27
View File
@@ -94,6 +94,8 @@ static void readline_initialize_everything PARAMS((void));
static void bind_arrow_keys_internal PARAMS((Keymap));
static void bind_arrow_keys PARAMS((void));
static void bind_bracketed_paste_prefix PARAMS((void));
static void readline_default_bindings PARAMS((void));
static void reset_default_bindings PARAMS((void));
@@ -306,6 +308,11 @@ int _rl_echo_control_chars = 1;
the editing mode: @ for emacs, : for vi-command, + for vi-insert. */
int _rl_show_mode_in_prompt = 0;
/* Non-zero means to attempt to put the terminal in `bracketed paste mode',
where it will prefix pasted text with an escape sequence and send
another to mark the end of the paste. */
int _rl_enable_bracketed_paste = 0;
/* **************************************************************** */
/* */
/* Top Level Functions */
@@ -1179,6 +1186,10 @@ readline_initialize_everything ()
/* Try to bind a common arrow key prefix, if not already bound. */
bind_arrow_keys ();
/* Bind the bracketed paste prefix assuming that the user will enable
it on terminals that support it. */
bind_bracketed_paste_prefix ();
/* If the completion parser's default word break characters haven't
been set yet, then do so now. */
if (rl_completer_word_break_characters == (char *)NULL)
@@ -1289,6 +1300,22 @@ bind_arrow_keys ()
#endif
}
static void
bind_bracketed_paste_prefix ()
{
Keymap xkeymap;
xkeymap = _rl_keymap;
_rl_keymap = emacs_standard_keymap;
rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin);
_rl_keymap = vi_insertion_keymap;
rl_bind_keyseq_if_unbound (BRACK_PASTE_PREF, rl_bracketed_paste_begin);
_rl_keymap = xkeymap;
}
/* **************************************************************** */
/* */
/* Saving and Restoring Readline's state */