Re: more distinct default bash prompt?

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

 





On 22 May 2023, at 04:50, Jens-Ulrik Petersen <petersen@xxxxxxxxxx> wrote:


In Fedora the bash prompt is not colored or highlighted by default.

I personally find this a usability issue: it makes it hard to find previous commands between long outputs when scrolling back in a terminal.  Of course in my own host I have a custom prompt, but it means whenever I am using a different Fedora/Centos/RHEL system or vm, the prompt is not highlighted by default, which I miss.

Since I spent a little time thinking about and investigating this I thought I would write to start a discussion here.

I noticed that Ubuntu has a bold green and blue prompt and NixOS has a green one by default, though not Archlinux or OpenSuSE I think.

I think it would be nice to have a distinctive prompt by default, or at least a very easy way to get one permanently (ie in a single command: even if that were `dnf install bash-color-prompt` or running say `colorprompt` once).

For example I could suggest we change the default fedora bash prompt from:
PS1="[\u@\h \W]\\$ "
to something like:
PS1="\[\e[\${PROMPT_COLOR}m\][\u@\h \W]\[\e[0m\]\\$ ".

Then the PROMPT_COLOR envvar would make it easy for users to change or customize their prompt coloring anyway.
For example with PROMPT_COLOR="1;32" one gets a bold green prompt, which seems readable in both dark or light terminals.

What do people think overall? Are there other pros and cons of a color prompt?
Any better ideas or direction?

So long as you do this in such a way that if i set PS1 you do not override my config.
please do not set PROMPT_COMMAND either.

Barry


Jens

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-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/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux