From 0ffa202ac86836eb86de1bfb44c28c2b89ecc706 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Date: Fri, 1 Mar 2013 17:15:00 +0100 Subject: Updated the bashrc file. The wduchain function becomes an alias with just the actual DUChain cache path. Moreover, I've removed the "g" function, since exporting the CDPATH environment variable seems to work as well. Also remember that we need the bash-completion package installed so Bash can autocomplete directories under the CDPATH. --- bashrc | 39 +++++---------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/bashrc b/bashrc index c1d3456..2b2d43e 100644 --- a/bashrc +++ b/bashrc @@ -6,7 +6,7 @@ alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=au alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' -# vim stuff +# Set vim as the default editor export EDITOR=vim export VISUAL=vim alias vi=vim @@ -20,7 +20,7 @@ PS1='\u:\w$(__git_ps1 "\[\033[0;32m\]@\[\033[1;32m\]%s\[\033[0m\]\]") $ ' # Rake completion complete -C $HOME/.rake_completion -o default rake -# Paths +# KDE Paths export KDEDIR=/home/mssola/kde export KDEDIRS=$KDEDIR export KDEV=$HOME/Projects/kde @@ -37,10 +37,7 @@ export CMAKE_LIBRARY_PATH=$KDEDIR/lib:$CMAKE_LIBRARY_PATH export CMAKE_INCLUDE_PATH=$KDEDIR/include:$CMAKE_INCLUDE_PATH # Function to whip the KDevelop cache -function wduchain { - rm -rf $HOME/.kdevduchain - rm -rf $HOME/.cache/kdevduchain/* -} +alias wduchain='rm -rf $HOME/.cache/kdevduchain/*' # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" @@ -53,31 +50,5 @@ 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=( - home - $HOME - - kde - $KDEV - - ruby - $RUBY - - 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" -} +# Exporting our own CDPATH +export CDPATH=$CDPATH:$HOME/.cd -- cgit v1.2.3