Re: more distinct default bash prompt?

2023-07-09 Thread DJ Chase
On Sun Jul 9, 2023 at 3:04 AM EDT, Mattia Verga via devel wrote: > Il 09/07/23 00:05, Leon Fauster via devel ha scritto: > > Am 08.07.23 um 22:44 schrieb Barry: > >> > >>> On 8 Jul 2023, at 19:56, Kushal Das wrote: > >>> > >>> White background is a good choice for accessibility iirc. > >> Isn’t

Re: more distinct default bash prompt?

2023-07-09 Thread Mattia Verga via devel
Il 09/07/23 00:05, Leon Fauster via devel ha scritto: > Am 08.07.23 um 22:44 schrieb Barry: >> >>> On 8 Jul 2023, at 19:56, Kushal Das wrote: >>> >>> White background is a good choice for accessibility iirc. >> Isn’t is contrast that matters not any particular background? > > On the contrary it

Re: more distinct default bash prompt?

2023-07-08 Thread Leon Fauster via devel
Am 08.07.23 um 22:44 schrieb Barry: On 8 Jul 2023, at 19:56, Kushal Das wrote: White background is a good choice for accessibility iirc. Isn’t is contrast that matters not any particular background? On the contrary it helps, a white background helps the human visual system to

Re: more distinct default bash prompt?

2023-07-08 Thread Barry
> On 8 Jul 2023, at 19:56, Kushal Das wrote: > > White background is a good choice for accessibility iirc. Isn’t is contrast that matters not any particular background? Personal I find white background is not a good accessibility choice for me. Barry

Re: more distinct default bash prompt?

2023-07-08 Thread Kushal Das
On 27/05/23, Peter Oliver wrote: > On Fri, 26 May 2023, Marián Konček wrote: > > > AFAIK Gnome Terminal is the only terminal that uses white background by > > default. To my knowledge, all the other terminals use black background. > > Both xterm and rxvt default to a white background. > White

Re: more distinct default bash prompt?

2023-07-08 Thread Thomas M Steenholdt via devel
I love the idea of a colorized prompt by default on Fedora! A few points to the posted example: - Let's keep it somewhat identical to the existing one unless a change is really important - Let's leave out the RC code from the prompt - that can be useful in certain scenarios, but is

Re: more distinct default bash prompt?

2023-07-05 Thread Leon Fauster via devel
Should this also take into account some common individual prompts? We have for instance /usr/share/git-core/contrib/completion/git-prompt.sh sourced. Maybe a form of compat for such wide used customisations? Thought ... ___ devel mailing list --

Re: more distinct default bash prompt?

2023-07-01 Thread Björn Persson
Jens-Ulrik Petersen wrote: > it now defaults to normal green and adds the > red error code from Stephan (maybe this part could still be improved?) I like the red error code enough that I'm trying it out on my own workstation. Yet I doubt it's suitable for the default prompt. I'll remember what it

Re: more distinct default bash prompt?

2023-06-27 Thread Jens-Ulrik Petersen
So I made a copr repo PoC: https://copr.fedorainfracloud.org/coprs/petersen/bash-color-prompt/ which you can test: the bash-color-prompt package there drops a conditionalized PS1 into /etc/profile.d/ for now. $ sudo dnf-3 copr enable petersen/bash-color-prompt $ sudo dnf install

Re: more distinct default bash prompt?

2023-06-26 Thread Jens-Ulrik Petersen
Late follow-up... On Tue, May 30, 2023 at 2:46 AM Peter Oliver < lists.fedoraproject@mavit.org.uk> wrote: > On Fri, 26 May 2023, Björn Persson wrote: > > > One way to avoid all the color issues could be to just make the prompt > > bold by default. That would probably make it stand out enough

Re: more distinct default bash prompt?

2023-05-29 Thread Peter Oliver
On Fri, 26 May 2023, Björn Persson wrote: One way to avoid all the color issues could be to just make the prompt bold by default. That would probably make it stand out enough in many situations. I think it wouldn't help much for programmers compiling software though, because GCC outputs

Re: more distinct default bash prompt?

2023-05-27 Thread Peter Oliver
On Fri, 26 May 2023, Marián Konček wrote: AFAIK Gnome Terminal is the only terminal that uses white background by default. To my knowledge, all the other terminals use black background. Both xterm and rxvt default to a white background. -- Peter

Re: more distinct default bash prompt?

2023-05-26 Thread Björn Persson
Marián Konček wrote: > AFAIK Gnome Terminal is the only terminal that uses white background by > default. To my knowledge, all the other terminals use black background. If you can get *all* the terminal emulators amended so that users can configure the prompt color in the same dialog box where

Re: more distinct default bash prompt?

2023-05-26 Thread Björn Persson
Chris Adams wrote: > My personal (bike-shedding) preference is to not run external commands > on every prompt though; when a system is slow or having problems, those > can kill any chance at recovery or even troubleshooting. I agree. Please keep the number of things that can make the shell

Re: more distinct default bash prompt?

2023-05-26 Thread Björn Persson
Jens-Ulrik Petersen 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. I find myself pressing Enter several times before

Re: more distinct default bash prompt?

2023-05-26 Thread Marián Konček
AFAIK Gnome Terminal is the only terminal that uses white background by default. To my knowledge, all the other terminals use black background. On 26. 5. 2023 8:50, Barry wrote: On 25 May 2023, at 16:58, stan via devel wrote: I find the green too bright, I would prefer it with a little

Re: more distinct default bash prompt?

2023-05-26 Thread Barry
> On 25 May 2023, at 16:58, stan via devel > wrote: > > I find the green too > bright, I would prefer it with a little more black in it. The colours that a particular users sees on particular hardware will vary a large amount. Also the inability of CLI code to know if dark mode is in used

Re: more distinct default bash prompt?

2023-05-25 Thread stan via devel
On Wed, 24 May 2023 15:05:07 -0400 "Chris Murphy" wrote: > Green is an efficient color choice. It tends to appear to the > brightest. Part of this relates to the luminosity function of human > vision which has a peak wavelength that happens to be the same as the > medium wavelength photo

Re: more distinct default bash prompt?

2023-05-24 Thread Chris Murphy
On Tue, May 23, 2023, at 1:08 AM, Jens-Ulrik Petersen wrote: > On Tue, May 23, 2023 at 12:47 PM Neal Gompa wrote: >> I actually would prefer that we color both, and make it obvious that >> "root" is special. We should account for common color-blindness >> issues, though. > > Sure, I think I

Re: more distinct default bash prompt?

2023-05-23 Thread Ben Beasley
In my experience, “colorblindness” is generally understood to include a range of color vision “anomalies.” I have the most common form, deuteranomaly. Green does not look as bright as other colors to me, and I have a hard time distinguishing greenish colors from reddish colors when they are

Re: more distinct default bash prompt?

2023-05-23 Thread David Cantrell
On Tue, May 23, 2023 at 07:07:17AM -0400, Neal Gompa wrote: > On Tue, May 23, 2023 at 1:08 AM Jens-Ulrik Petersen > wrote: > > > > On Tue, May 23, 2023 at 12:47 PM Neal Gompa wrote: > >> > >> I actually would prefer that we color both, and make it obvious that > >> "root" is special. We should

Re: more distinct default bash prompt?

2023-05-23 Thread Chris Adams
Once upon a time, Jason Montleon said: > One of the things I discovered playing with tput last night trying > some of this is that it will error if you don't have a terminal. > ssh foo.example.com virsh start bar > tput: No value for $TERM and no -T specified My prompt manipulations are wrapped

Re: more distinct default bash prompt?

2023-05-23 Thread Chris Adams
Once upon a time, Jens-Ulrik Petersen said: > Also while we are bike-shedding... What about \W vs \w ? > I think fedora has used \W "forever" - I am not a huge fan... > though I suppose its main merit is not over-flowing/extending for very long > dir paths. I use \w and set PROMPT_DIRTRIM=4. --

Re: more distinct default bash prompt?

2023-05-23 Thread Jason Montleon
One of the things I discovered playing with tput last night trying some of this is that it will error if you don't have a terminal. ssh foo.example.com virsh start bar tput: No value for $TERM and no -T specified To correct this using your example you can do: if [ -t 0 ] then

Re: more distinct default bash prompt?

2023-05-23 Thread Nick Clifton
What do people think overall? Are there other pros and cons of a color prompt? Any better ideas or direction? I like the idea of using tput to get the correct strings for setting different terminal effects, so I now use: # Success prompt: prompt_term[0]=$(tput bold) # Fail prompt:

Re: more distinct default bash prompt?

2023-05-23 Thread Neal Gompa
On Tue, May 23, 2023 at 1:08 AM Jens-Ulrik Petersen wrote: > > On Tue, May 23, 2023 at 12:47 PM Neal Gompa wrote: >> >> I actually would prefer that we color both, and make it obvious that >> "root" is special. We should account for common color-blindness >> issues, though. > > > Sure, I think I

Re: more distinct default bash prompt?

2023-05-23 Thread Vitaly Zaitsev via devel
On 22/05/2023 05:49, Jens-Ulrik Petersen wrote: What do people think overall? Are there other pros and cons of a color prompt? Any better ideas or direction? PS1 from all my systems: export PS1="\[\e[33m\][\[\e[36m\]\u\[\e[0m\]@\[\e[31m\]\h\[\e[0m\]

Re: more distinct default bash prompt?

2023-05-23 Thread Stephan Bergmann
On 5/22/23 16:42, Richard W.M. Jones wrote: FWIW Haiku uses bash and has a prompt which changes colour (green/red) depending on whether the status code of the last command was good or bad. I found this surprisingly useful. They use: \[`if [ $? = 0 ]; then echo "\e[32m"; else echo "\e[31m";

Re: more distinct default bash prompt?

2023-05-22 Thread Jens-Ulrik Petersen
Also while we are bike-shedding... What about \W vs \w ? I think fedora has used \W "forever" - I am not a huge fan... though I suppose its main merit is not over-flowing/extending for very long dir paths. Jens ___ devel mailing list --

Re: more distinct default bash prompt?

2023-05-22 Thread Jens-Ulrik Petersen
On Tue, May 23, 2023 at 12:47 PM Neal Gompa wrote: > I actually would prefer that we color both, and make it obvious that > "root" is special. We should account for common color-blindness > issues, though. Sure, I think I agree: perhaps purple for root? I am all for "color blind testing"

Re: more distinct default bash prompt?

2023-05-22 Thread Neal Gompa
On Tue, May 23, 2023 at 12:24 AM Jens-Ulrik Petersen wrote: > > On Mon, May 22, 2023 at 1:49 PM Dridi Boukelmoune > wrote: >> >> On Mon, May 22, 2023 at 3:50 AM Jens-Ulrik Petersen >> wrote: >> > For example I could suggest we change the default fedora bash prompt from: >> > PS1="[\u@\h

Re: more distinct default bash prompt?

2023-05-22 Thread Jens-Ulrik Petersen
On Mon, May 22, 2023 at 1:49 PM Dridi Boukelmoune < dridi.boukelmo...@gmail.com> wrote: > On Mon, May 22, 2023 at 3:50 AM Jens-Ulrik Petersen > wrote: > > For example I could suggest we change the default fedora bash prompt > from: > > PS1="[\u@\h \W]\\$ " > > to something like: > >

Re: more distinct default bash prompt?

2023-05-22 Thread Barry
> On 22 May 2023, at 04:50, Jens-Ulrik Petersen 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 >

Re: more distinct default bash prompt?

2023-05-22 Thread Stephen Gallagher
On Mon, May 22, 2023 at 2:44 PM Chris Adams wrote: > Once upon a time, Stephen Gallagher said: > > We could put the following at the end of /etc/bashrc: > > Something like that would seem more appropriate in an /etc/profile.d > drop-in - very little special-sauce should go in /etc/bashrc.

Re: more distinct default bash prompt?

2023-05-22 Thread Chris Adams
Once upon a time, Stephen Gallagher said: > We could put the following at the end of /etc/bashrc: Something like that would seem more appropriate in an /etc/profile.d drop-in - very little special-sauce should go in /etc/bashrc. My personal (bike-shedding) preference is to not run external

Re: more distinct default bash prompt?

2023-05-22 Thread Josh Stone
On 5/22/23 10:59 AM, Chris Adams wrote: > Once upon a time, John Reiser said: >> Warning: This is intrusive because reading the status code via "$?" resets >> it to zero: >>$ false >>$ echo $? >>1 >>$ echo $? >>0 > > That is incorrect. The second reading of $? is the exit

Re: more distinct default bash prompt?

2023-05-22 Thread Stephen Gallagher
On Mon, May 22, 2023 at 2:27 PM Stephen Gallagher wrote: > > On Sun, May 21, 2023 at 11:50 PM Jens-Ulrik Petersen > wrote: > > > > In Fedora the bash prompt is not colored or highlighted by default. > ... > > I think it would be nice to have a distinctive prompt by default, or at > > least a

Re: more distinct default bash prompt?

2023-05-22 Thread Stephen Gallagher
On Sun, May 21, 2023 at 11:50 PM Jens-Ulrik Petersen wrote: > > In Fedora the bash prompt is not colored or highlighted by default. ... > 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

Re: more distinct default bash prompt?

2023-05-22 Thread Chris Adams
Once upon a time, John Reiser said: > Warning: This is intrusive because reading the status code via "$?" resets it > to zero: >$ false >$ echo $? >1 >$ echo $? >0 That is incorrect. The second reading of $? is the exit code of running "echo $?" (which succeeded). Just

Re: more distinct default bash prompt?

2023-05-22 Thread John Reiser
FWIW Haiku uses bash and has a prompt which changes colour (green/red) depending on whether the status code of the last command was good or bad. I found this surprisingly useful. They use: \[`if [ $? = 0 ]; then echo "\e[32m"; else echo "\e[31m"; fi`\]\w[\e[0m\]> Warning: This is intrusive

Re: more distinct default bash prompt?

2023-05-22 Thread Chris Adams
Once upon a time, Richard W.M. Jones said: > FWIW Haiku uses bash and has a prompt which changes colour (green/red) > depending on whether the status code of the last command was good or > bad. I found this surprisingly useful. They use: > > \[`if [ $? = 0 ]; then echo "\e[32m"; else echo

Re: more distinct default bash prompt?

2023-05-22 Thread Richard W.M. Jones
FWIW Haiku uses bash and has a prompt which changes colour (green/red) depending on whether the status code of the last command was good or bad. I found this surprisingly useful. They use: \[`if [ $? = 0 ]; then echo "\e[32m"; else echo "\e[31m"; fi`\]\w[\e[0m\]> Rich. -- Richard Jones,

Re: more distinct default bash prompt?

2023-05-22 Thread Dan Čermák
Hi Jens, Jens-Ulrik Petersen writes: > 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

Re: more distinct default bash prompt?

2023-05-21 Thread Dridi Boukelmoune
On Mon, May 22, 2023 at 3:50 AM Jens-Ulrik Petersen 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

more distinct default bash prompt?

2023-05-21 Thread Jens-Ulrik Petersen
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