Merge remote-tracking branch 'upstream/master'
diff --git a/aliases/general.aliases.bash b/aliases/general.aliases.bash
index d91fbbb..79bd7aa 100644
--- a/aliases/general.aliases.bash
+++ b/aliases/general.aliases.bash
@@ -17,9 +17,10 @@
alias c='clear'
alias k='clear'
+alias cls='clear'
alias edit="$EDITOR"
-alias page="$PAGER"
+alias pager="$PAGER"
alias q="exit"
@@ -48,22 +49,25 @@
function aliases-help() {
echo "Generic Alias Usage"
echo
- echo " sl = ls"
- echo " ls = ls -G"
- echo " la = ls -AF"
- echo " ll = ls -al"
- echo " l = ls -a"
- echo " c/k = clear"
- echo " .. = cd .."
- echo " ... = cd ../.."
- echo " - = cd -"
- echo " h = history"
- echo " md = mkdir -p"
- echo " rd = rmdir"
- echo " editor = $EDITOR"
- echo " pager = $PAGER"
- echo " piano = pianobar"
- echo " q = exit"
- echo " irc = $IRC_CLIENT"
- echo
+ echo " sl = ls"
+ echo " ls = ls -G"
+ echo " la = ls -AF"
+ echo " ll = ls -al"
+ echo " l = ls -a"
+ echo " c/k/cls = clear"
+ echo " .. = cd .."
+ echo " ... = cd ../.."
+ echo " - = cd -"
+ echo " h = history"
+ echo " md = mkdir -p"
+ echo " rd = rmdir"
+ echo " editor = $EDITOR"
+ echo " pager = $PAGER"
+ echo " piano = pianobar"
+ echo " q = exit"
+ echo " irc = $IRC_CLIENT"
+ echo " md = mkdir -p"
+ echo " rd = rmdir"
+ echo " rb = ruby"
+ echo
}
diff --git a/aliases/homebrew.aliases.bash b/aliases/homebrew.aliases.bash
new file mode 100644
index 0000000..051081d
--- /dev/null
+++ b/aliases/homebrew.aliases.bash
@@ -0,0 +1,24 @@
+# Some aliases for Homebrew
+
+alias bup="brew update && brew upgrade"
+alias bout="brew outdated"
+alias bin="brew install"
+alias brm="brew uninstall"
+alias bls="brew list"
+alias bsr="brew search"
+alias binf="brew info"
+alias bdr="brew doctor"
+
+function brew-help() {
+ echo "Homebrew Alias Usage"
+ echo
+ echo "bup = brew update && brew upgrade"
+ echo "bout = brew outdated"
+ echo "bin = brew install"
+ echo "brm = brew uninstall"
+ echo "bls = brew list"
+ echo "bsr = brew search"
+ echo "binf = brew info"
+ echo "bdr = brew doctor"
+ echo
+}
diff --git a/bash_it.sh b/bash_it.sh
index 4a9b30d..d63458a 100644
--- a/bash_it.sh
+++ b/bash_it.sh
@@ -73,6 +73,7 @@
echo " rails-help This will list out all the aliases you can use with rails."
echo " git-help This will list out all the aliases you can use with git."
echo " todo-help This will list out all the aliases you can use with todo.txt-cli"
+ echo " brew-help This will list out all the aliases you can use with Homebrew"
echo " aliases-help Generic list of aliases."
echo " plugins-help This will list out all the plugins and functions you can use with bash-it"
echo
diff --git a/plugins/available/javascript.plugins.bash b/plugins/available/javascript.plugins.bash
index 2e0b56c..a480d9e 100644
--- a/plugins/available/javascript.plugins.bash
+++ b/plugins/available/javascript.plugins.bash
@@ -3,15 +3,30 @@
# The install directory is hard-coded. TOOD: allow the directory to be specified on the command line.
#
+[[ -z "$JQUERY_VERSION_NUMBER" ]] && JQUERY_VERSION_NUMBER="1.6.1"
+[[ -z "$JQUERY_UI_VERSION_NUMBER" ]] && JQUERY_UI_VERSION_NUMBER="1.8.13"
function rails_jquery {
curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
}
function jquery_install {
- curl -o public/javascripts/jquery.js http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
+ if [ -z "$1" ]
+ then
+ version=$JQUERY_VERSION_NUMBER
+ else
+ version="$1"
+ fi
+ curl -o public/javascripts/jquery.js "http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js"
}
-function jquery_ui_install {
- curl -o public/javascripts/jquery_ui.js http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js
-}
\ No newline at end of file
+function jquery_ui_install {
+ if [ -z "$1" ]
+ then
+ version=$JQUERY_UI_VERSION_NUMBER
+ else
+ version="$1"
+ fi
+
+ curl -o public/javascripts/jquery_ui.js "http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js"
+}
diff --git a/plugins/available/rvm.plugin.bash b/plugins/available/rvm.plugin.bash
index d3c81ed..e158a80 100644
--- a/plugins/available/rvm.plugin.bash
+++ b/plugins/available/rvm.plugin.bash
@@ -1,16 +1,29 @@
#!/bin/bash
-switch () {
- rvm $1
- local v=$(rvm_version)
- rvm wrapper $1 textmate
- echo "Switch to Ruby version: "$v
-}
-rvm_default () {
- rvm --default $1
- rvm wrapper $1 textmate
-}
+# Load RVM, if you are using it
+[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
-function rvm_version () {
- ruby --version
-}
\ No newline at end of file
+# Check to make sure that RVM is actually loaded before adding
+# the customizations to it.
+if [ "$rvm_path" ]
+then
+ # Load the auto-completion script if RVM was loaded.
+ [[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
+
+ switch () {
+ rvm $1
+ local v=$(rvm_version)
+ rvm wrapper $1 textmate
+ echo "Switch to Ruby version: "$v
+ }
+
+ rvm_default () {
+ rvm --default $1
+ rvm wrapper $1 textmate
+ }
+
+ function rvm_version () {
+ ruby --version
+ }
+
+fi