Skip to content

Instantly share code, notes, and snippets.

@cballenar
Last active December 21, 2015 15:59
Show Gist options
  • Save cballenar/6330685 to your computer and use it in GitHub Desktop.
Save cballenar/6330685 to your computer and use it in GitHub Desktop.
My Terminal Settings

My Terminal Settings

Saving & Sharing my terminal settings.

Tools

Settings

Local Command Prompt

My .bash_profile file contains the following:

export PS1="\[\e[0;36m\]\n\h: \[\e[0;33m\]\w\n\[\e[0m\]→ "

Where \n creates a line break; \h gets the hostname; \w gets the current working directory; and the arrow is just cool! The other parts are colors: \[\e[0;36m\] is cyan; \[\e[0;33m\] is yellow; and \[\e[0m\] is back to normal, in the case of Solarized, grey. And so it outputs the following (though with some color):


UNKN0WN: ~
→ 

The initial line break is nice to create a little padding between the last entry/output and your new entry.

Server Command Prompt

Since my server uses Linux, the commands are slightly different and had to be adjusted. I changed the primary color to red for root.

# for root, use red
export PS1='\e[1;31m\n\u@\h: \e[0;33m\w\n\e[m→ '

# for my user, use green
export PS1='\e[1;32m\n\u@\h: \e[0;33m\w\n\e[m→ '

Don't forget to...

Run the following in terminal to avoid a second non visor window, if you are using TotalTerminal, of course:

defaults write com.apple.Terminal TotalTerminalCloseWindowsOnStart -bool YES

If MAMP is installed

You may wanna add MAMP's PHP and MySQL. Checkout my gist on Starting with Laravel

Fuck...

Don't forget to install The Fuck.

Credits

I used the following links to do most of what I did here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment