This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 0/4] Improve "show style", use style in "help" and "apropos".
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