Skip to content

Commit

Permalink
Update with settings from work machine
Browse files Browse the repository at this point in the history
Uses older prompt for now
  • Loading branch information
Jeff Byrnes committed Jul 26, 2012
1 parent 0d622a4 commit 9dfe952
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 10 deletions.
11 changes: 9 additions & 2 deletions .aliases
Expand Up @@ -10,6 +10,9 @@ alias -- -="cd -"
alias d="cd ~/Dropbox" alias d="cd ~/Dropbox"
alias p="cd ~/Sites" alias p="cd ~/Sites"
alias g="git" alias g="git"
alias gco='git co'
alias gci='git ci'
alias grb='git rb'
alias h="history" alias h="history"
alias j="jobs" alias j="jobs"
alias v="vim" alias v="vim"
Expand All @@ -18,6 +21,10 @@ alias s="subl ."
alias o="open" alias o="open"
alias oo="open ." alias oo="open ."


# Shortcuts to open tunnels for easy rmate usage
alias hfmtunnel='ssh -R 52698:localhost:52698 hfm'
alias jbtunnel='ssh -R 52698:localhost:52698 66.92.65.152'

# Detect which `ls` flavor is in use # Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls` if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color" colorflag="--color"
Expand All @@ -26,10 +33,10 @@ else # OS X `ls`
fi fi


# List all files colorized in long format # List all files colorized in long format
alias l="ls -l ${colorflag}" alias l="ls -lpFh ${colorflag}"


# List all files colorized in long format, including dot files # List all files colorized in long format, including dot files
alias la="ls -la ${colorflag}" alias la="ls -lapFh ${colorflag}"


# List only directories # List only directories
alias lsd='ls -l ${colorflag} | grep "^d"' alias lsd='ls -l ${colorflag} | grep "^d"'
Expand Down
44 changes: 36 additions & 8 deletions .bash_prompt
Expand Up @@ -43,13 +43,41 @@ export WHITE
export BOLD export BOLD
export RESET export RESET


function parse_git_dirty() { # function parse_git_dirty() {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" # [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
} # }


function parse_git_branch() { # function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" # git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
} # }


export PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" # export PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
export PS2="\[$ORANGE\]→ \[$RESET\]" export PS2="\[$ORANGE\]→ \[$RESET\]"

# Old prompt colors

black="\033[0;30m"
dark_grey="\033[1;30m"
red="\033[0;31m"
RED="\033[1;31m"
blue="\033[0;34m"
BLUE="\033[1;34m"
cyan="\033[0;36m"
CYAN="\033[1;36m"
NC="\033[0m" # No Color

# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
# Cyan 0;36 Light Cyan 1;36
# Red 0;31 Light Red 1;31
# Purple 0;35 Light Purple 1;35
# Brown 0;33 Yellow 1;33
# Light Gray 0;37 White 1;37


# Set the base PS1
# export PS1="\[\e[0;31m\]\h:\[\e[m\]\[\e[0;34m\]\w\[\e[m\]\n\[\e[0;30m\]\u\[\e[m\]\[\e[1;30m\]\$\[\e[m\] "

# Old Git completion prompt
export PS1="\[$red\]\h:\[\e[m\]\[$blue\]\w$(__git_ps1 ' (%s)')\[\e[m\]\n\[$black\]\u\[\e[m\]\[$dark_grey\]\$\[\e[m\] "
8 changes: 8 additions & 0 deletions .gitconfig
Expand Up @@ -67,6 +67,14 @@
[merge] [merge]
# Include summaries of merged commits in newly created merge commit messages # Include summaries of merged commits in newly created merge commit messages
log = true log = true
[difftool "Kaleidoscope"]
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
[difftool "sourcetree"]
cmd = /Applications/Kaleidoscope.app/Contents/MacOS/ksdiff -w \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true


# Use `origin` as the default remote on the `master` branch in all cases # Use `origin` as the default remote on the `master` branch in all cases
# [branch "master"] # [branch "master"]
Expand Down
28 changes: 28 additions & 0 deletions .gitignore
@@ -1,3 +1,31 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache
.tags
.tags_sorted_by_file

# Editor files
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace
# Dreamweaver added files
_notes
dwsync.xml


# Compiled Python files # Compiled Python files
*.pyc *.pyc


Expand Down

0 comments on commit 9dfe952

Please sign in to comment.