Add support for el_bind_key() and example usage binding '?' in examples/cli.c

This changeset refactors el_bind_key_in_metamap() into two functions,
adding el_bind_key(), to provide the ability for the user to bind keys
in both the regular and the meta-key maps.

Several useful, but previously internal, functions have been made global to
facilitate the example code mentioned above. These are likely useful to the
user of this library as well:

  el_print_columns() - Display words in columns across a tty_cols wide screen.
  el_ring_bell()     - Can be used as default key binding function.
  el_find_word()     - Returns a copy of the word at rl_point.
This commit is contained in:
Joachim Nilsson
2010-08-05 12:48:51 +02:00
parent 27fcc878a1
commit 5e9177fd18
5 changed files with 86 additions and 43 deletions

2
TODO
View File

@@ -1,7 +1,7 @@
TODO
* Port "fileman" example from BSD libedit, http://www.thrysoee.dk/editline/
* Add support for rl_bind_key(), currently one needs to "hack" the Map[]
* Add support for rl_bind_key(), currently only en editline specific el_bind_key() exists.
* Add support for inhibiting completion: rl_inhibit_completion
* Make "char *rl_prompt" globally visible.
* Add support for rl_set_prompt().