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 F34883894E4A for ; Fri, 24 Apr 2020 20:00:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F34883894E4A 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]:38102) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jS4V4-00063G-Hs; Fri, 24 Apr 2020 16:00:38 -0400 Received: from [176.228.60.248] (port=1064 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jS4V2-0008Jn-Rj; Fri, 24 Apr 2020 16:00:38 -0400 Date: Fri, 24 Apr 2020 23:00:25 +0300 Message-Id: <83368sac2u.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <87eesc1x2d.fsf@tromey.com> (message from Tom Tromey on Fri, 24 Apr 2020 13:51:54 -0600) Subject: Re: [PATCH] Add completion styling References: <20200409024112.18065-1-tom@tromey.com> <83369dp3gy.fsf@gnu.org> <87eesc1x2d.fsf@tromey.com> X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, 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: Fri, 24 Apr 2020 20:00:49 -0000 > From: Tom Tromey > Cc: Tom Tromey , gdb-patches@sourceware.org > Date: Fri, 24 Apr 2020 13:51:54 -0600 > > Eli> Would it make sense to default to the style determined by the user's > Eli> colored-completion-prefix setting? > > That's a bit of a pain because readline parses LS_COLORS on its own. > This doesn't seem to be documented anywhere. I'm reluctant to try to > use readline's code, because it is using "_" prefixes; in readline these > indicate private items and there's at least one bug report about this in > bugzilla already (some distro made these hidden in the .so and it broke > gdb). Fair enough. > Eli> Also, do we want the default styling to be no-styling, or do we want > Eli> something else? > > I would prefer to enable it by default. It's easy to disable if one > prefers. But I thought the code disabled it by default? I did I misread? > Eli> Btw, Emacs solves this problem differently: it uses a distinct styling > Eli> for the first character that distinguishes between completion > Eli> candidates. I wonder if that idea is more useful for quickly > Eli> realizing what one needs to type next. Or do we want to follow > Eli> Readline here for consistency reasons? > > I think the Emacs idea is nice. Maybe we want to let the user control > the prefix text, the "difference character", and the final completion > text. That would be nice, I think.