Cleaned bash it up

pull/3/head
Robert R Evans 2010-10-02 12:29:17 -07:00
parent 74fe8378bd
commit 76ed68d18c
21 changed files with 37 additions and 13 deletions

View File

@ -1,3 +1,4 @@
#!/bin/bash
# Initialize Bash It # Initialize Bash It
# Reload Library # Reload Library

View File

@ -1,2 +1,4 @@
#!/bin/bash
# Your Custom Bash alias', functions, etc. # Your Custom Bash alias', functions, etc.
# #

View File

@ -1,3 +1,5 @@
#!/bin/bash
function rh { function rh {
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
} }

View File

@ -1,3 +1,5 @@
#!/bin/bash
function git_remote { function git_remote {
echo "Running: git remote add origin ${GIT_HOSTING}:$1.git" echo "Running: git remote add origin ${GIT_HOSTING}:$1.git"
git remote add origin $GIT_HOSTING:$1.git git remote add origin $GIT_HOSTING:$1.git

View File

@ -1,3 +1,5 @@
#!/bin/bash
function rails_jquery { function rails_jquery {
curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
} }

View File

@ -1,3 +1,5 @@
#!/bin/bash
function nginx_reload() { function nginx_reload() {
FILE="${NGINX_PATH}/logs/nginx.pid" FILE="${NGINX_PATH}/logs/nginx.pid"
if [ -e $FILE ]; then if [ -e $FILE ]; then

View File

@ -1,3 +1,5 @@
#!/bin/bash
# List directory contents # List directory contents
alias sl=ls alias sl=ls
alias ls='ls -G' # Compact view, show colors alias ls='ls -G' # Compact view, show colors

View File

@ -1,3 +1,5 @@
#!/bin/bash
# colored grep # colored grep
export GREP_OPTIONS='--color=auto' export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;33' export GREP_COLOR='1;33'
@ -5,8 +7,5 @@ export GREP_COLOR='1;33'
# colored ls # colored ls
export LSCOLORS='Gxfxcxdxdxegedabagacad' export LSCOLORS='Gxfxcxdxdxegedabagacad'
# Apply theming defaults
PS1="%n@%m:%~%# "
# Load the theme # Load the theme
source "$BASH/themes/$BASH_THEME/$BASH_THEME.bash" source "$BASH/themes/$BASH_THEME/$BASH_THEME.bash"

View File

@ -1,2 +0,0 @@
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'

View File

@ -1,3 +1,5 @@
#!/bin/bash
# append to bash_history if Terminal.app quits # append to bash_history if Terminal.app quits
shopt -s histappend shopt -s histappend

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Desktop Programs # Desktop Programs
alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'" alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'"
alias photoshop="open -a '/Applications/Adobe Photoshop CS3/Adobe Photoshop.app'" alias photoshop="open -a '/Applications/Adobe Photoshop CS3/Adobe Photoshop.app'"

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Aliases # Aliases
alias g='git' alias g='git'
alias gst='git status' alias gst='git status'

View File

@ -1,3 +1,5 @@
#!/bin/bash
function tab() { function tab() {
osascript 2>/dev/null <<EOF osascript 2>/dev/null <<EOF
tell application "System Events" tell application "System Events"

View File

@ -1,11 +1,4 @@
# #!/bin/bash
# These is some Alias' for Rails
#
alias ss='script/server'
alias sc='script/console'
alias restart_app='touch tmp/restart.txt'
# Rails Commands # Rails Commands
alias r='rails' alias r='rails'
@ -18,4 +11,7 @@ alias rp='rails plugin'
alias ra='rails application' alias ra='rails application'
alias rd='rails destroy' alias rd='rails destroy'
alias ss='script/server'
alias sc='script/console'
alias restart_app='touch tmp/restart.txt'
alias devlog='tail -f log/development.log' alias devlog='tail -f log/development.log'

View File

@ -1,3 +1,4 @@
#!/bin/bash
function remove_gem { function remove_gem {
gem list | grep $1 | awk '{ print $1; }' | xargs sudo gem uninstall gem list | grep $1 | awk '{ print $1; }' | xargs sudo gem uninstall
} }

View File

@ -1,3 +1,4 @@
#!/bin/bash
switch () { switch () {
rvm $1 rvm $1
local v=$(rvm_version) local v=$(rvm_version)

View File

@ -1,3 +1,4 @@
#!/bin/bash
rm_svn(){ rm_svn(){
find $1 -name .svn -print0 | xargs -0 rm -rf find $1 -name .svn -print0 | xargs -0 rm -rf
} }

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Textmate # Textmate
alias e='mate . &' alias e='mate . &'
alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &' alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &'

View File

@ -1,2 +1,4 @@
#!/bin/bash
# VIM # VIM
alias v='mvim --remote-silent' alias v='mvim --remote-silent'

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Some Colors # Some Colors
BGREEN='\[\033[1;32m\]' BGREEN='\[\033[1;32m\]'
GREEN='\[\033[0;32m\]' GREEN='\[\033[0;32m\]'

View File

@ -1 +1,2 @@
#!/bin/bash
export PS1='\[\033[1;34m\]$(prompt_char)\[\033[1;32m\] $(parse_git_branch) ${ORANGE}\h ${D}in ${GREEN}\w ${D}→ ' export PS1='\[\033[1;34m\]$(prompt_char)\[\033[1;32m\] $(parse_git_branch) ${ORANGE}\h ${D}in ${GREEN}\w ${D}→ '