Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash prompt username coloring issues in iTerm 2 #5

Closed
mattbanks opened this issue May 16, 2012 · 5 comments
Closed

Bash prompt username coloring issues in iTerm 2 #5

mattbanks opened this issue May 16, 2012 · 5 comments

Comments

@mattbanks
Copy link

Been spending a few days putting together all the dotfiles I want to use and love your color scheme and setup for the bash prompt! I grabbed your .bash_prompt and it all works perfectly in Terminal (10.7.4), but in iTerm 2 (Build 1.0.0.20120203), the username and machine name aren't colored properly. I'm using Solarized Dark and everything else looks fine. Here are two screenshots:

Terminal (10.7.4)

terminal

iTerm 2

iTerm

Even if I set iTerm 2 to Dark Background, the username and machine name are still gray.

Any idea what might be causing the issues in iTerm 2?

@mattbanks
Copy link
Author

Actually, it looks like the colors just aren't rendering at all in iTerm2. The changes to the prompt flow through, but the colors aren't making their way over.

@mattbanks
Copy link
Author

Did some more digging and found it's in the check that sets TERM=xterm-256color. I copied the lines 5-6 from Mathias Bynes dotfiles .bash_prompt and replaced line 15-17 from your .bash_prompt and it gives me all colors in iTerm2. I can fork the repo and submit a pull request in the morning.

@necolas
Copy link
Owner

necolas commented May 17, 2012

Hi Matt. Originally, I didn't include those lines from Mathias's file because it "breaks" the terminal colors in Snow Leopard (it doesn't support 256 colors). Having said that, it would be great if iTerm2 automatically accepted the prompt...maybe you can help me find a way to have it included in the conditional on line 15.

For the time being, I've been changing iTerm2's preferences:

Profiles > Terminal > Report terminal type: xterm-256color

@mattbanks
Copy link
Author

Ah gotcha - I'm on Lion so I couldn't test Snow Leopard. I think the reporting type is a good workaround. Maybe just add that in the iTerm line at the top of .bash_prompt?

@necolas
Copy link
Owner

necolas commented May 17, 2012

I'll try and find out how best to do that. Also, please let me know if you experience any rendering issues. There are occasions when I edit a file using vim and scrolling down through the file causes the rendered position of lines to jump around - can't work out what is behind that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants