aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-05-23 09:23:09 -0600
committerTom Tromey <tom@tromey.com>2020-05-23 14:53:33 -0600
commiteca1f90cf47a2edc1a1cd22e12c6c0f3b900654e (patch)
tree78a5fffcd39bab954df305868e98f774c749f01e /gdb/NEWS
parent51e2cfa2dc2dd600727c91701c747c28fa67a5df (diff)
downloadgdb-eca1f90cf47a2edc1a1cd22e12c6c0f3b900654e.zip
gdb-eca1f90cf47a2edc1a1cd22e12c6c0f3b900654e.tar.gz
gdb-eca1f90cf47a2edc1a1cd22e12c6c0f3b900654e.tar.bz2
Add completion styling
Readline has a styling feature for completion -- if it is enabled, the common prefix of completions will be displayed in a different style. This doesn't work in gdb, because gdb implements its own completer. This patch implements the feature. However, it doesn't directly use the Readline feature, because gdb can do a bit better: it can let the user control the styling using the existing mechanisms. This version incorporates an Emacs idea, via Eli: style the prefix, the "difference character", and the suffix differently. gdb/ChangeLog 2020-05-23 Tom Tromey <tom@tromey.com> * NEWS: Add entry for completion styling. * completer.c (_rl_completion_prefix_display_length): Move declaration earlier. (gdb_fnprint): Use completion_style. (gdb_display_match_list_1): Likewise. * cli/cli-style.c (completion_prefix_style) (completion_difference_style, completion_suffix_style): New globals. (_initialize_cli_style): Register new globals. * cli/cli-style.h (completion_prefix_style) (completion_difference_style, completion_suffix_style): Declare. gdb/doc/ChangeLog 2020-05-23 Tom Tromey <tom@tromey.com> * gdb.texinfo (Output Styling): Mention completion styling. (Editing): Mention readline completion styling. gdb/testsuite/ChangeLog 2020-05-23 Tom Tromey <tom@tromey.com> * gdb.base/style.exp: Add completion styling test. * lib/gdb-utils.exp (style): Add completion styles.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 2a9c8b8..23a4ed7 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -62,6 +62,17 @@ show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
executable file; if 'warn', just display a warning; if 'off', don't
attempt to detect a mismatch.
+set style completion-prefix foreground COLOR
+set style completion-prefix background COLOR
+set style completion-prefix intensity VALUE
+set style completion-difference foreground COLOR
+set style completion-difference background COLOR
+set style completion-difference intensity VALUE
+set style completion-suffix foreground COLOR
+set style completion-suffix background COLOR
+set style completion-suffix intensity VALUE
+ Control the styling of completions.
+
tui new-layout NAME WINDOW WEIGHT [WINDOW WEIGHT]...
Define a new TUI layout, specifying its name and the windows that
will be displayed.