diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-23 18:08:00 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-05-23 18:08:00 +0200 |
commit | fa06aff8754a2c8064d52edb6af8d6cf8b7a1fc1 (patch) | |
tree | c5a7930e7339a0650348e569e9dac235a4aa92cf | |
parent | 9f51b986d2e05d477bed34cac94e73542a28f156 (diff) | |
download | ell-fa06aff8754a2c8064d52edb6af8d6cf8b7a1fc1.tar.gz ell-fa06aff8754a2c8064d52edb6af8d6cf8b7a1fc1.tar.xz ell-fa06aff8754a2c8064d52edb6af8d6cf8b7a1fc1.zip |
repl: highlight matching parenthesis
-rw-r--r-- | repl.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -42,6 +42,12 @@ run (struct context *ctx, struct item *program) { } } +static int +init_readline (void) { + rl_variable_bind ("blink-matching-paren", "on"); + return 0; +} + int main (int argc, char *argv[]) { (void) argc; @@ -54,6 +60,7 @@ main (int argc, char *argv[]) { using_history (); const char *slash = strrchr (argv[0], '/'); rl_readline_name = slash ? ++slash : argv[0]; + rl_startup_hook = init_readline; char *line; while ((line = readline ("> "))) { |