>From 60e2a71733fb62086dc7d5d8354bc065058e8686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= Date: Tue, 31 May 2011 00:55:28 +0200 Subject: [PATCH 3/6] Colored completion, readline configuration (3/6) - #define COLORED_STATS - add "rl_colored_stats" which controls the colorization activation The feature depends on the readline configuration variable "colored-stats". --- lib/readline/bind.c | 3 +++ lib/readline/rlconf.h | 4 ++++ lib/readline/rlprivate.h | 4 ++++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/lib/readline/bind.c b/lib/readline/bind.c index 59e7964..f6d2ac9 100644 --- a/lib/readline/bind.c +++ b/lib/readline/bind.c @@ -1451,6 +1451,9 @@ static const struct { #if defined (VISIBLE_STATS) { "visible-stats", &rl_visible_stats, 0 }, #endif /* VISIBLE_STATS */ +#if defined (COLORED_STATS) + { "colored-stats", &rl_colored_stats, 0 }, +#endif /* !COLORED_STATS */ { (char *)NULL, (int *)NULL, 0 } }; diff --git a/lib/readline/rlconf.h b/lib/readline/rlconf.h index 39f94db..b93a6d7 100644 --- a/lib/readline/rlconf.h +++ b/lib/readline/rlconf.h @@ -28,6 +28,10 @@ /* Define this to get an indication of file type when listing completions. */ #define VISIBLE_STATS +/* Define this to get filenames colorized according to their type when + listing completions. */ +#define COLORED_STATS + /* This definition is needed by readline.c, rltty.c, and signals.c. */ /* If on, then readline handles signals in a way that doesn't screw. */ #define HANDLE_SIGNALS diff --git a/lib/readline/rlprivate.h b/lib/readline/rlprivate.h index 384ff67..46834f9 100644 --- a/lib/readline/rlprivate.h +++ b/lib/readline/rlprivate.h @@ -174,6 +174,10 @@ extern int rl_complete_with_tilde_expansion; extern int rl_visible_stats; #endif /* VISIBLE_STATS */ +#if defined (COLORED_STATS) +extern int rl_colored_stats; +#endif /* !COLORED_STATS */ + /* readline.c */ extern int rl_line_buffer_len; extern int rl_arg_sign; -- 1.7.3.4