Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iterm2 path color setting

I used to be a ubuntu user but switched to Mac recently. I really want to configure the colorscheme of iterm2 to look act like ubuntu default terminal as much as possible.

The biggest problem is I can't configure the color of the current path. in Ubuntu, it is like enter image description here

However, in iterm2, the bobby laptop name and the ~/Documents are the same color when I change the foreground. This is really annoying. It is really painful to look at your file path tangled with the machine name.

like image 790
Bobby Avatar asked Jan 06 '17 04:01

Bobby


1 Answers

In iterm2, the bobby laptop name and the ~/Documents are the same color when you change the foreground.

You might adjust the Minimum Contrast to the maximum value.

Just adjust the Minimum Contrast to the middle value.

enter image description here


After some comments, I know you wanna change the PS1 part of bash.

Just use command nano ~/.bash_profile and paste the code to the end of the file:

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Restart your terminal to see what happened.

You can adjust the color, the fonts, the text in terminal settings. Then you will get what you want.

For more information, you can search "OS X Terminal Colors".

like image 107
Leon Xiong Avatar answered Oct 19 '22 17:10

Leon Xiong