From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6072 invoked by alias); 18 Jun 2019 22:40:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6061 invoked by uid 89); 18 Jun 2019 22:40:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:911 X-HELO: mail-wm1-f53.google.com Received: from mail-wm1-f53.google.com (HELO mail-wm1-f53.google.com) (209.85.128.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jun 2019 22:40:27 +0000 Received: by mail-wm1-f53.google.com with SMTP id z23so4872296wma.4 for ; Tue, 18 Jun 2019 15:40:27 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id s8sm22045192wra.55.2019.06.18.15.40.24 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 15:40:25 -0700 (PDT) Subject: Re: [RFA 0/4] Improve "show style", use style in "help" and "apropos". To: Philippe Waroquiers , Tom Tromey References: <20190531131903.21203-1-philippe.waroquiers@skynet.be> <02aed9b6-1ce0-b48f-ed01-ef0fc0fa20b5@redhat.com> <1560888703.8865.1.camel@skynet.be> <87sgs6hb9f.fsf@tromey.com> <1560891176.8865.3.camel@skynet.be> <1560891478.8865.5.camel@skynet.be> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <32b0b61b-755a-0ca9-b854-3e9db5d781ea@redhat.com> Date: Tue, 18 Jun 2019 22:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1560891478.8865.5.camel@skynet.be> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-06/txt/msg00365.txt.bz2 On 6/18/19 9:57 PM, Philippe Waroquiers wrote: >> Wondering ... >> >> At shell level, coloring seems to be disabled when piped. >> E.g. >> $ ls -l >> .... files with some colors >> $ ls -l | cat >> .... same output, but no colors >> $ > ls has an option to control coloring. > ls -l --color=always|cat > will still be colored. > > So, we might add an option -style [on|off] to the GDB pipe_command, > if we believe it should output styling sequence. Agreed. In other words, this would let us pipe with style. :-D In addition, "set style enabled" could be made an auto-boolean setting, with default "auto", enable styling iff outputting to a terminal. Then, "on" would force styling even if outputting to a pipe. This would let you force styling with: (gdb) with style enabled on -- | apropos -v breakpoint | less Thanks, Pedro Alves