Created
November 6, 2010 01:00
-
-
Save rjacoby/665089 to your computer and use it in GitHub Desktop.
Useful additions to .profile for bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EDITOR='mate -w' | |
export LESSEDIT='mate -l %lm %f' | |
alias cdf='eval `osascript /Applications/Utilities/OpenTerminal.app/Contents/Resources/Scripts/OpenTerminal.scpt `' | |
alias reshell='source ~/.profile' | |
alias r3="rvm use ruby-1.9.2@rails3" | |
alias r="rails" | |
# Complete against SSH known hosts | |
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh sftp dig nslookup traceroute ping telnet csshX | |
#--- GIT shell completion and display ----- | |
# MacPorts Bash shell command completion | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion | |
fi | |
# Fancy prompt | |
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \W \[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] ' | |
# Set the terminal title to useful stuff | |
case $TERM in | |
xterm*) | |
termtitle() { echo -n -e "\033]0;${1}\007"; } | |
PROMPT_COMMAND='termtitle "${USER}@${HOSTNAME} : ${PWD} $(__git_ps1)"' | |
;; | |
*) | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment