Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

iTerm2 theme similar to one in the git workshop videos

Does anyone know how to configure their .bash_profile to behave/look similar to the ones used by the teachers in the git workshop video?

Not only was their iTerm2 theme colorful and pleasant but it also had useful git status information.

7 Answers

Okay then clone the repo to your desktop

  • cd ~/Desktop
  • Then git clone it
  • cd into new folder. cd bash-profile
  • rename each file with a dot in front of the file name
    • So if it's bash_profile - Rename it to .bash_profile - For each file
  • For each file, type `mv ~/Desktop/bash-profile/FILENAME ~
    • Note the space between the filename and the tilde character ~

Do that for each file.

close your terminal and restart it. If you get any errors. Stop, and come back to here. To test type this google cats

Did that work?

No? Stop and come back here.

Yes? You're good to go!

Here is my bash profile on Github. https://github.com/JaredCowan/bash-profile

before I give you instructions can you cd into your root and tell me if you have these files. cd into your root dir and list files. cd ~ && ls -a

Tell me if you have .bash_profile, .profile and .bashrc

If not tell me what you don't have.

Thanks for helping out Jared!

I actually have none of above, but I had created a .bash_profile earlier today with some custom edits, didn't like the results and deleted it to revert it back to normal.

You can delete the whole push() and checkfile() function. Line 2 - 59

Then delete the makegrunt() and install_htop() function.

You can leave everything else.

Now you can search google, stackoverflow and github from terminal by typing the website name, then your search.

google how to added ajax to my project

also you can make make multipul files and open them by typing lazy and then the files names

lazy test1.txt test2.txt test3.txt

you can do the same with creating directories by typing

dir my-project next-project

No spaces!

Also, when you are changing folders. You don't have to type uppercase file names. like cd ~/Desktop you can just leave it lowercase.

Awesome! Thanks so much Jared. Do you think there's anyway we can set up a quick meeting on codementor.io? I really appreciate your help and don't mind throwing in some money for your help. I'm a big sucker for themes and I want to tweak just a few of the colors but am not getting very far by googling.

I had a color theme I liked but no git support for it. And I'm also wondering if these bash settings just need to be set on remote servers as well to see the same type of styling and git support.

Thanks again!

Thanks Jared! That worked perfectly. Is it necessary to have the bash_functions file in there too?

I see it still has some of your ssh info in there still. Just don't want it to cause issues when working with my own remote files via ssh.

Yeah I can do that.

But it's fairly easy. If you open the .bashrc file you'll most of the style code in there.

If you want to change the color for your computer name

  • Change style_user color from YELLOW to like RED or something. See the colors in the color folder.

The folder path is style_path

If you want to change the git branch color (currently red) change the style_branch

If you want to change the $ where you type the command.

  • Change style_chars

For text color of text you type change that in iterm settings.

EDIT: And now to see the changes. just type reload

Sounds good, I will try messing around with these settings and reach out if I have any issues. I think this http://en.wikipedia.org/wiki/Tput is clearing up a lot of the questions I had.

Thanks again!

I'm sorry for all the questions, but is iTerm2 necessary at this point? I downloaded it hoping it would have some of zshell's functionality. But my basic terminal seems to be behaving exactly how I want it with the instructions you gave me.

It's no problem.

When I started, I used terminal. But once I found iTerm I'm never going back. To me iTerm is much better.

You can check this article out.

Do you know if this is changing anything in my current $PATH?

I seem to be getting notifications from you. But when I come I don't see them.

The rbenv is no biggie. Just delete line 7 in .bashrc. I would highly recommend you download and install rbenv though. It's like mandatory if you want to do anything with ruby and rails.

And if you didn't have any bash files then it's just adding things to your path.

Type $PATH in terminal and it'll show the whole thing.

Alexander Schott
Alexander Schott
8,318 Points

Hello Jared,

I want to use your files on my virtual box machine (debian). I copied everything from git, but i get some errors now. One problem is the LC_ALL: cannot change locale (en_US.UTF-8: file or folder not found).

bash: prompt_git: command not found is the other one.

Thanks for help.

FIXED: i changed the en_US to de_DE for the german locale and i removed the git_prompt but i dont see changes in color etc.