Re: Output text color (was dnf list color bad)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Samuel Sieb wrote:
> On 7/2/20 1:00 PM, Beartooth wrote:
>> 	Might we (pretty please!) get one more choice on the screen for
>> choosing colors? It could be labelled "output" and work just like text,
>> background, and (optionally) bold; or it could use the bold color by
>> default.
> 
> The default color is the default color, there's no distinguishing between
> typing and output.

Assuming I'm reading the request right, this part
specifically is about adjusting the coloring in the
terminal; making the commands which are input a different
color than the output.

For that case, while you can't do it from a setting at the
terminal level, you can do it in bash¹ by setting PS1 to set
the color of the prompt and input, then calling tput to
reset the color for the output via a trap call.  Details:

https://wiki.archlinux.org/index.php/Bash/Prompt_customization#Escapes_between_command_input_and_output

So you'd set the default color for the terminal to the color
you wanted for output and then the PS1 variable would set
the color(s) for the prompt and input.  There's a lot of
possibilities there.  It's surely not done in quite the way
you asked for it, Beartooth, but I think the end result
you're looking for can be achieved.

¹ I don't know about other shells, but it wouldn't surprise
in the slightest if other shells could do something similar.
I'd be hard pressed to bet against zsh lacking such support.

-- 
Todd

Attachment: signature.asc
Description: PGP signature

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux