aboutsummaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2013-07-31 13:44:44 +0200
committerMiquel Sabaté <mikisabate@gmail.com>2013-07-31 13:44:44 +0200
commitbeb7e96b45b8d32d87a3d128b4068ca4c3b36853 (patch)
tree8fbaae111837155223c6b056088136e4717b73ca /bashrc
parent5e2b6d05c9fa3ae6ef9565fdd3ec268d0157cfc7 (diff)
downloaddotfiles-beb7e96b45b8d32d87a3d128b4068ca4c3b36853.tar.gz
dotfiles-beb7e96b45b8d32d87a3d128b4068ca4c3b36853.zip
Moved the install script from Ruby to plain bash
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc53
1 files changed, 5 insertions, 48 deletions
diff --git a/bashrc b/bashrc
index 3fb9a79..4cf49b7 100644
--- a/bashrc
+++ b/bashrc
@@ -52,52 +52,9 @@ export GOROOT=$HOME/Projects/go
export GOPATH=$HOME/.go
export PATH=$HOME/.go/bin:$HOME/Projects/go/bin:$PATH
-# Including shortcuts, idea from https://github.com/fxn/dotfiles
-GO_SHORTCUTS=(
- ruby
- $KRUBY
+# Completion for the review command. See: https://github.com/mssola/review
+source $HOME/.review_completion.sh
- build
- $KDEV/build/kdev-ruby
-)
-
-function g {
- local target=$1
- local len=${#GO_SHORTCUTS[@]}
- for (( i=0; i<$len; i+=2 )); do
- if [[ "$1" = "${GO_SHORTCUTS[$i]}" ]]; then
- cd "${GO_SHORTCUTS[$i+1]}"
- return
- fi
- done
- echo "unknown shortcut"
-}
-
-# The path for patches.
-export PATCH=$HOME/.patches
-
-# Create a patch and save it to the directory of patches. If the patch
-# already exists, it will ask if the user wants to overwrite it.
-p() {
- path="$PATCH/$1.patch"
-
- # The patch file already exists.
- if [ -f $path ]; then
- echo "The patch \`$1' already exists."
- read -p "Do you want to overwrite its contents ? (Y/n) " yn
- case $yn in
- n | N | no | NO ) exit 1
- esac
- fi
-
- # Choose the proper SCM tool.
- if [ -d .git ]; then
- git diff > $path
- elif [ -d .hg ]; then
- hg diff > $path
- elif [ -d .svn ]; then
- svn diff > $path
- else
- echo 'Unsupported SCM.'
- fi
-}
+# The g utility. See: https://github.com/mssola/g
+source $HOME/.g.sh
+source $HOME/.gcompletion.sh