What terminal theme do you currently use? Do you find sometimes it’s hard to find a specific line in your screen?
I used to use normal terminal, but it’s really hard for me to find information in an all text environment.
I first changed my theme to Homebrew (from preference)
Black background and green text made my eyes feel better. But I thought there should be a better way to distinguish between username, file directory, status, etc.
Therefore, I researched and found a way to make using terminal easier.
Here is how to do it:
1. Go to your home directory
2. Open your .bash_profile
3. Decide the color you like. Here is the color I used.
# colors! green="\[\033[0;32m\]" purple="\[\033[0;35m\]" reset="\[\033[0m\]" GREENBOLD="\[\033[1;32m\]"
You can find more color options here.
4. Export your Bash’s prompt (PS1)
# '\u' adds the name of the current user to the prompt # '\$(__git_ps1)' adds git-related stuff # '\W' adds the name of the current directory export PS1="$GREENBOLD\u$green\$(__git_ps1)$purple \W $ $reset"
That’s it. Save your .bash_profile and restart your terminal. Now you have a pretty terminal that you can enjoy using. Let’s code some more!