From da3625876e4aec4b9286b76f885b54f84efc2f27 Mon Sep 17 00:00:00 2001 From: John Barnette Date: Tue, 28 Jan 2014 12:09:35 -0600 Subject: [PATCH] :lipstick: --- bash/.profile.swp | Bin 12288 -> 0 bytes bash/aliases.sh | 2 -- bash/functions.sh | 37 ++++++++++++++++++++++++++++++++ bash/git.sh | 53 ---------------------------------------------- bash/main.sh | 25 ++++++++++------------ gitconfig | 12 +++++++---- install.sh | 7 ------ 7 files changed, 56 insertions(+), 80 deletions(-) delete mode 100644 bash/.profile.swp delete mode 100644 bash/aliases.sh create mode 100644 bash/functions.sh delete mode 100644 bash/git.sh delete mode 100644 install.sh diff --git a/bash/.profile.swp b/bash/.profile.swp deleted file mode 100644 index 31e63526c968ebcab3a9aeb2a8dc9809b99fd2b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI%&1%9x5Ww+Ck3!pEUm*Rs)@VG~2WW+W(u38ThkS|E(3NznH=nUrAEOT-?XFP6laOm|~ftclrOxKO@`^uGlD6)v7;v>^Kv$YdTrD-cyNtB=H zv8C<*K!2l(rJpK2d(X2^e^n@(9QQM0C?kMCRe>)(dwjZ-ZqRAp-`#pQ&2iNU^do=( z0tg_000IagfI!U!^vaQ6bB7BPPAO`BEsl=>0tg_000IagfB*srAb/dev/null); then + title="$title @ $branch" + fi + + echo -ne "\033]2;$title\007" +} + +# cd to a github repo +function gd { + local parent=$(dirname "$1") + local name=$(basename "$1") + local owner=$(basename "$parent") + local nwo="$owner/$name" + local dir="$SRCPATH/$nwo" + + [ -e "$dir" ] || git clone "https://github.com/$nwo" "$dir" + + cd "$dir" +} + +function gda { + gd $1 + atom +} + +function gdag { + gda $1 + github +} diff --git a/bash/git.sh b/bash/git.sh deleted file mode 100644 index 711095c..0000000 --- a/bash/git.sh +++ /dev/null @@ -1,53 +0,0 @@ -__git_ps1 () -{ - local git="$(which git)" - - local g="$($git rev-parse --git-dir 2>/dev/null)" - if [ -n "$g" ]; then - local r - local b - if [ -d "$g/../.dotest" ] - then - if test -f "$g/../.dotest/rebasing" - then - r="|REBASE" - elif test -f "$g/../.dotest/applying" - then - r="|AM" - else - r="|AM/REBASE" - fi - b="$($git symbolic-ref HEAD 2>/dev/null)" - elif [ -f "$g/.dotest-merge/interactive" ] - then - r="|REBASE-i" - b="$(cat "$g/.dotest-merge/head-name")" - elif [ -d "$g/.dotest-merge" ] - then - r="|REBASE-m" - b="$(cat "$g/.dotest-merge/head-name")" - elif [ -f "$g/MERGE_HEAD" ] - then - r="|MERGING" - b="$($git symbolic-ref HEAD 2>/dev/null)" - else - if [ -f "$g/BISECT_LOG" ] - then - r="|BISECTING" - fi - if ! b="$($git symbolic-ref HEAD 2>/dev/null)" - then - if ! b="$($git describe --exact-match HEAD 2>/dev/null)" - then - b="$(cut -c1-7 "$g/HEAD")..." - fi - fi - fi - - if [ -n "$1" ]; then - printf "$1" "${b##refs/heads/}$r" - else - printf " (%s)" "${b##refs/heads/}$r" - fi - fi -} diff --git a/bash/main.sh b/bash/main.sh index 28d19da..5c13034 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -1,23 +1,20 @@ -export DOTFILES=~/my/dotfiles - -source "$DOTFILES/bash/aliases.sh" -source "$DOTFILES/bash/git.sh" - -if [ -s "$DOTFILES/bash/private.sh" ] - then source "$DOTFILES/bash/private.sh" -fi - if [ -f "/opt/boxen/env.sh" ] then source "/opt/boxen/env.sh" fi -if [ -d $HOME/src/github/app-env ]; then - export PATH="$HOME/src/github/app-env/bin:$PATH" - source "$HOME/src/github/app-env/share/app-ps1.sh" +export DOTFILES=~/my/dotfiles + +source "$DOTFILES/bash/functions.sh" + +if [ -s "$DOTFILES/bash/private.sh" ]; then + source "$DOTFILES/bash/private.sh" fi export EDITOR="atom --wait" +export GOPATH=$HOME/go export NODE_NO_READLINE=1 -export PATH=$HOME/bin:$PATH -export PS1='$(app-ps1 "%s ")$(__git_ps1 "[%s] ")\w\\$ ' +export PATH=$HOME/bin:$GOPATH/bin:$PATH +export PROMPT_COMMAND="set-terminal-title" +export PS1="❤ " +export SRCPATH=$HOME/src export VISUAL=$EDITOR diff --git a/gitconfig b/gitconfig index 5f01c69..1d431b6 100644 --- a/gitconfig +++ b/gitconfig @@ -7,6 +7,10 @@ [credential] helper = /opt/boxen/bin/boxen-git-credential +[filter "media"] + clean = git-media-clean %f + smudge = git-media-smudge %f + [github] user = jbarnette @@ -14,8 +18,8 @@ protocol = https [push] - default = current - helper = /opt/boxen/bin/boxen-git-credential + default = simple + [user] - name = John Barnette - email = jbarnette@github.com + name = John Barnette + email = jbarnette@github.com diff --git a/install.sh b/install.sh deleted file mode 100644 index 86137b6..0000000 --- a/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -ln -s ~/my/dotfiles/bash/main.sh ~/.profile -ln -s ~/.profile ~/.bash_profile -ln -s ~/.profile ~/.bashrc -ln -s ~/my/dotfiles/emacs.d ~/.emacs.d -ln -s ~/my/dotfiles/gitconfig ~/.gitconfig - -. ~/.profile