Skip to content

Commit

Permalink
added: git, prompt and rvm basic scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk luesebrink committed Apr 13, 2011
1 parent 4df1813 commit 9121d5a
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
alias g="git"
alias commit="git commit"
alias checkout="git checkout"
alias branch="git branch"
alias status="git status"
alias master="git checkout master"
alias stash="git stash"
alias gsvn="git svn"

# take more stuff from: http://michael-prokop.at/blog/2007/12/03/git-svn-in-30-minutes/
#
# git svn clone example:
# git svn clone -s --prefix=svn/ \
# https://svn.tugraz.at/svn/$project foobar && \
40 changes: 40 additions & 0 deletions packages/prompt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

black="\[\033[0;30m\]"
red="\[\033[0;31m\]"
green="\[\033[0;32m\]"
darkyellow="\[\033[0;33m\]"
deepblue="\[\033[0;34m\]"
magenta="\[\033[0;35m\]"
blue="\[\033[0;36m\]"
lime="\[\033[1;37m\]"
lime="\[\033[1;38m\]"
lime="\[\033[1;39m\]"
white="\[\033[0;40m\]"
red_inv="\[\033[0;41m\]"

if [ "$UID" = "0" ];
then
\# I am root
COLOR2="\[\033[1;31m\]"
fi

#PS1="$lime\u $green\h$lime \w: "
#PS2="$lime\u ${grey}\h${lime} ${w}:: "
#PS1="\e[39m\u\e[m \e[32m\h\e[m \w: "
PS1="\[\033[39m\]\u \[\033[32m\]\h \[\033[39m\]\w: "
PS2="\e[31m\u\e[m \e[32m\h\e[m \w:: "

function cd() {

builtin cd "${1:-${HOME}}"
#echo --$1--
w=$(~/rc/c2prompt.pl)
#echo --$w--
#PS1="\e[39m\u\e[m \e[32m\h\e[0m\] ${w}: "
#PS1="\[\e[1;31;44m\] \u \[\e[0m\] @ \[\e[32m\h\[\e[0m\] ${w}: "
PS1="\[\033[39m\]\u \[\033[32m\]\h \[\033[39m\]${w}: "
#PS1="\[\e[39m\]\u\[\e[0m\]@\[\e[32m\h\[\e[0m\] ${w}: "
PS2=" >> "
}

15 changes: 15 additions & 0 deletions packages/rvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

function clear-rails-and-ruby-package() {
unalias r
unalias testrb
unalias ri
unalias rdoc
unalias rake
unalias irb
unalias gem
unalias er
}
clear-rails-and-ruby-package

alias r=ruby

0 comments on commit 9121d5a

Please sign in to comment.