From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsec114.isp.belgacom.be (mailsec114.isp.belgacom.be [195.238.20.110]) by sourceware.org (Postfix) with ESMTPS id ED1463851C1C for ; Sat, 23 May 2020 21:48:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ED1463851C1C IronPort-SDR: 27D+H+6VkZydNjForz9N5HKBn328RHpPoh4Kz9j+859mZbA10V8BDRwlzIFmwbiaqyEgWG9InY Pz8AueeDaJ7DD37BIo8BeUS3cJv3j43UwBJ1Vi8B5aqP06RGSrl787yr86hsbhCSOEpdx7wJb/ BfTxWf38nHioMje7W5/Pqm2u60CTWZwhvHtOJK9IZ+gcu+Z/ZCvY5hgoJgJrQiRGBTazX27ZPj +/TJuCVxorF3IC6kjTOY/b6nz9PL/+CZGVRjRDC99GM66hPjIs+DkY05ey5raqw5jMRqfU88m7 n60= IronPort-PHdr: =?us-ascii?q?9a23=3Ao/v2EB3RYLA5g/krsmDT+DRfVm0co7zxezQtwd?= =?us-ascii?q?8ZseMWLfad9pjvdHbS+e9qxAeQG9mCtrQd0rSd6/qocFdDyK7JiGoFfp1IWk?= =?us-ascii?q?1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBA?= =?us-ascii?q?j0OxZrKeTpAI7SiNm82/yv95HJbAhEmTqwbalvIBmrrAjdudUajZV/Iast1x?= =?us-ascii?q?XFpWdFdf5Lzm1yP1KTmBj85sa0/JF99ilbpuws+c1dX6jkZqo0VbNXAigoPG?= =?us-ascii?q?Az/83rqALMTRCT6XsGU2UZiQRHDg7Y5xznRJjxsy/6tu1g2CmGOMD9UL45VS?= =?us-ascii?q?i+46ptVRTljjoMOTwk/2HNksF+j79VrhK/qRJxwYHUbp2aO/Rxca3SZt4aWW?= =?us-ascii?q?hMU9xNWyBdGI6xbY0CBPcBM+ZCqIn9okMDowG+BQmtAOPvyydIhmfo0qYn0+?= =?us-ascii?q?suCxvG3As5H9ITsXTbss/1NLwPWu2y1KnIzTTDb/dX2Tfl8IjHbAotoP+WUr?= =?us-ascii?q?JqdsrR0FQvFwLbgVWKsozoJCiV1ucNsmid8eVgSfijhHU5pAxopDWk28gjhJ?= =?us-ascii?q?XTiI0P1lDE6Tt2wJwzJdCgVkJ3f92pHYdfui2GK4d7QMMvTm51tSg61rELtp?= =?us-ascii?q?G1cigXxZkpwxPSdfKJfpaG7x/gV+ucLzZ1iXJrdb+wgxu/8E6twfD/WMmsyF?= =?us-ascii?q?tGsDdJn9vWunwQ2RHe69KLR/hg8ku71zuC2Qbe4fxeL08uj6rUMZshz6Y1lp?= =?us-ascii?q?oUrEvMADf7mF7zjK+KbkUk/fWo6/j/brXmuJCcM4h0hxn7MqszgsC/AOI4PR?= =?us-ascii?q?YSX2WD5+iwyb/u8VfkTLhEj/A6iKrUvI3AKckVqKO1GwpV3Zwi6xa7ATemyt?= =?us-ascii?q?MYnXwfIVJdeBKHjozpO1DWIPDgE/izmVqtny1xx/DBJ73hH5TNIWbZkLf6Zr?= =?us-ascii?q?t98E1cyQo1zd9B+5JYEKoOL+zrVk/rqNPYFgM5MxCzw+v/FNV90YYeVHmTAq?= =?us-ascii?q?+DN6PStEGH5+I1L+aQY48VvS73K+I56P72kX85hVgdcLGm3ZQKc3+0B+xmLF?= =?us-ascii?q?+FYXXwgtcOD3wKsxElTOztlV2CSyJcaGi8Xq0m/DE0FpiqDYDZRoCi0/S923?= =?us-ascii?q?KHGZgeWnpBD12dWSP0cICsR+0LbS+DZMRml2pXe6KmTtoZ1RCqtRfixvJYJ/?= =?us-ascii?q?DT4zAZuIj4nIxt5+zXlAkq+HprBt6aynyMQntvtngLVjk7wOZ1rBoumR+4za?= =?us-ascii?q?FkjqkARpRo7PRTX1JiOA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AnCACumcle/yFRiNllHgEBCxIMQIN?= =?us-ascii?q?zgUMhEiyEJIkBiAqbZgsBAQEBAQEBAQEILAECBAEBhEQCghonOBMCAwEBAQM?= =?us-ascii?q?CBQEBBgEBAQEBAQQEAWwEAQEHCoRRIQEDAQEFCgFDgjsigxYBBSMzIxAIAxg?= =?us-ascii?q?CAiYCAlcGE4Ynq1WBMoVSg1iBQIEOKoxTgUw/hCE+h2KCYASZNZh0fQeCV4E?= =?us-ascii?q?BBJdXHZ4CrliBaSKBVm1TgmlQJZ8KQjA3AgYIAQEDCXQIE4xIAQE?= X-IPAS-Result: =?us-ascii?q?A2AnCACumcle/yFRiNllHgEBCxIMQINzgUMhEiyEJIkBi?= =?us-ascii?q?AqbZgsBAQEBAQEBAQEILAECBAEBhEQCghonOBMCAwEBAQMCBQEBBgEBAQEBA?= =?us-ascii?q?QQEAWwEAQEHCoRRIQEDAQEFCgFDgjsigxYBBSMzIxAIAxgCAiYCAlcGE4Ynq?= =?us-ascii?q?1WBMoVSg1iBQIEOKoxTgUw/hCE+h2KCYASZNZh0fQeCV4EBBJdXHZ4CrliBa?= =?us-ascii?q?SKBVm1TgmlQJZ8KQjA3AgYIAQEDCXQIE4xIAQE?= Received: from 33.81-136-217.adsl-dyn.isp.belgacom.be (HELO md) ([217.136.81.33]) by relay.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 May 2020 23:48:20 +0200 Message-ID: Subject: Re: [PATCH] Add completion styling From: Philippe Waroquiers To: Tom Tromey Cc: gdb-patches@sourceware.org Date: Sat, 23 May 2020 23:48:20 +0200 In-Reply-To: <87a71ytlue.fsf@tromey.com> References: <20200409024112.18065-1-tom@tromey.com> <83369dp3gy.fsf@gnu.org> <87eesc1x2d.fsf@tromey.com> <87y2pr663s.fsf@tromey.com> <87a71ytlue.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, 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, 23 May 2020 21:48:25 -0000 On Sat, 2020-05-23 at 14:52 -0600, Tom Tromey wrote: > > > > > > "Tom" == Tom Tromey writes: > > Tom> I think the Emacs idea is nice. Maybe we want to let the user control > Tom> the prefix text, the "difference character", and the final completion > Tom> text. > > > Here's a new version of the patch that implements this idea. > > I'm checking this in. I played with it, nice. A suggestion: If easy to do, it would be nice to also have coloring in the ambiguous output: (gdb) di Ambiguous command "di": directory, dis, disa, disable, disassemble, disconnect, display. (but I guess this might not be easy if the coloring is done by readline, and the ambiguous list is produced by GDB). Another suggestion: I am wondering why completion-difference is not used to color the full set of characters needed to make a command non-ambiguous. For example, when completing , it would be nice to color of disconnect and color of display, of disassemble, .... The idea is to show what must be typed specifically to have this command, rather than show one letter but still giving something ambiguous needing further completion. Currently, only the 3rd letter is colored: e.g. is colored, but it implies then to type then tab then (and maybe tab again if you want to be sure) before having the command you want. Philippe