Open MicFin opened 7 years ago
Different people need different colors. This is a significant challenge to overcome. Also, developers in the past have picked odd colors that make some error messages invisible. That they have done this to themselves is one thing. If we do it to them, that's not so good.
I am opposed. Please try to convince me.
The way I envisioned it being implemented was us having 1-3 options that we write and include as part of installfest.
A few challenges I can certainly see arising from this addition are:
installfest
which is already a challenging dayI believe the benefits could potentially outweigh the downsides. I think that the colored theme adds immense value to understanding. This can be seen in text editors. Developers can write code in a text editor without color themes, but it is extremely challenging. Color adds context. It is also easy for our eyes to identify. A line being the wrong color is more obvious than a line starting with a >
versus a $
. Even seeing where a command was run versus the output is much more clear when there is color separating the different commands and accompanying output.
My feedback from developers is that eventually some of them implement this type of thing on their own using a variety of sources to customize their bash. That can certainly add to difficulties when we go to debug and someone has customized their bash using an online source we haven't vetted.
This could also be moved to part of unix-cli.
Again, just a suggestion, I understand the negatives may in fact outweigh the perceived benefits.
I think this is worth discussing, but I definitely lean towards developers doing this for themselves. We can mention that it's something they can pursue on their own maybe?
I took it upon myself to change a lot about my terminal halfway through the course, got tangled up in a mess of dot files, but learned a ton in the process and quickly got to a terminal theme that really worked better for me —but it was a very tedious process full of idiosyncrasies specific to me, trying to do that for everyone sounds like the time/work would outweigh the value, specifically the value of them doing it themselves.
I think as far as unvetted setups go, they should just always know that if they will get less consultant support the further they stray from installfest, i.e. if someone did their project in React, something we don't teach, they should expect considerably less support.
I advised someone today to look up customizing the bash prompt. Each person may want different colors, variations of current directory displayed, etc, and like @BenGitsCode mentioned it's a good learning exercise. For what it's worth, here's my bash prompt with all sorta of pretty colors: https://gist.github.com/danman01/a10b18be0bb1f96ebf0433e91272de0d
Careful about color on command output. @samguergen's color always grep created a bug in one of my cli pipe snippets.
Many of the developers like my monochrome setup since it is easy to read. I believe it forces us to parse syntax typographically, which is a great skill IMO.
A handful of developers (about 5, actually) find it really annoying.
I'd love to peek your setup sometime Jeff. I'm in the former camp there.
There are many ways we could add color to our bash that I think could improve the learning curve of using bash and git. As an example, below is highlighting the github branch name.
These colors can be set in the
.bashrc
Exampleexport PS1='\n\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\n\$ '
https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-ps1-prompt