From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id D4BDA38708F2 for ; Sat, 16 May 2020 19:25:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4BDA38708F2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eliz@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:46555) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja2Qz-0008Jn-Dh; Sat, 16 May 2020 15:25:21 -0400 Received: from [176.228.60.248] (port=1031 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ja2Qy-0004Ps-Jp; Sat, 16 May 2020 15:25:21 -0400 Date: Sat, 16 May 2020 22:25:10 +0300 Message-Id: <83367zd6nd.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <87y2pr663s.fsf@tromey.com> (message from Tom Tromey on Sat, 16 May 2020 13:18:47 -0600) Subject: Re: [PATCH] Add completion styling References: <20200409024112.18065-1-tom@tromey.com> <83369dp3gy.fsf@gnu.org> <87eesc1x2d.fsf@tromey.com> <87y2pr663s.fsf@tromey.com> X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2020 19:25:23 -0000 > From: Tom Tromey > Cc: Eli Zaretskii , gdb-patches@sourceware.org > Date: Sat, 16 May 2020 13:18:47 -0600 > > commit 0af816c447b989a47494b3b1ff970b463b100152 > Author: Tom Tromey > Date: Sat May 16 13:17:33 2020 -0600 > > 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-16 Tom Tromey > > * 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-16 Tom Tromey > > * gdb.texinfo (Output Styling): Mention completion styling. > (Editing): Mention readline completion styling. > > gdb/testsuite/ChangeLog > 2020-05-16 Tom Tromey > > * gdb.base/style.exp: Add completion styling test. > * lib/gdb-utils.exp (style): Add completion styles. > Thanks, the documentation parts are okay.