dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 4b48d63aec17adcbaaf31fb714deb38507ded9e9
parent c8faa8aa31eabca5bcece0da40b85f77c1adcb2d
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Fri,  7 Mar 2014 19:10:47 +0200

layout and adding liquidprompt

Diffstat:
M.bashrc | 105+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
M.bashrc.functions | 9++++++++-
M.bashrc.paths | 18++++++++++++------
3 files changed, 82 insertions(+), 50 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -65,30 +65,64 @@ xterm*|rxvt*) ;; esac -# functions { +# bash { + + # functions { if [ -f ~/.bashrc.functions ]; then - . ~/.bashrc.functions + source ~/.bashrc.functions fi -# } + # } -# PATH { + # PATH { - if [ -f ~/.bashrc.paths ]; then - . ~/.bashrc.paths - fi + __when_file_exist_do_source $HOME/.bashrc.paths -# } + # } -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bashrc.aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. + # Alias definitions. { + + # You may want to put all your additions into a separate file like + # ~/.bashrc.aliases, instead of adding them here directly. + # See /usr/share/doc/bash-doc/examples in the bash-doc package. + + __when_file_exist_do_source ~/.bashrc.aliases + + # } + + # Local bash changes { + + # PATH { + + __when_file_exist_do_source ~/.bashrc.paths.local + + # } + + # functions { + + __when_file_exist_do_source $HOME/.bashrc.functions.local + + # } -if [ -f ~/.bashrc.aliases ]; then - . ~/.bashrc.aliases -fi + + # Alias definitions. { + + # You may want to put all your additions into a separate file like + # ~/.bashrc.aliases, instead of adding them here directly. + # See /usr/share/doc/bash-doc/examples in the bash-doc package. + + __when_file_exist_do_source $HOME/.bashrc.aliases.local + + # } + + # bashrc { + + __when_file_exist_do_source $HOME/.bashrc.local + + # } + +# } # python { @@ -103,11 +137,11 @@ fi # http://saghul.github.io/pythonz/ { - + [[ -s $HOME/.pythonz/etc/bashrc ]] && source $HOME/.pythonz/etc/bashrc - + # } - + # pythonz { # http://virtualenvwrapper.readthedocs.org/en/latest/ export WORKON_HOME=~/.pythonz/venvs @@ -119,30 +153,15 @@ fi # } +# tab completion { -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if [ -f /etc/bash_completion ] && ! shopt -oq posix; then - . /etc/bash_completion -fi + # enable programmable completion features (you don't need to enable + # this, if it's already enabled in /etc/bash.bashrc and /etc/profile + # sources /etc/bash.bashrc). + if [ -f /etc/bash_completion ] && ! shopt -oq posix; then + source /etc/bash_completion + fi + +# } -# No clue why that's here. -#export CLASSPATH=$CLASSPATH:/usr/share/java/libreadline-java.jar -#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/ -#export PYTHONPATH=${PYTHONPATH}:/usr/lib/python2.7/dist-packages/IPython - -# rm alias -# if [ -n "$PS1" ] ; then -# rm () -# { -# ls -FCsd "$@" -# realpath "$@" -# echo 'remove[ny]? ' | tr -d '\012' ; read -# if [ "_$REPLY" = "_y" ]; then -# /usr/bin/safe-rm -rf "$@" -# else -# echo '(cancelled)' -# fi -# } -# fi +__when_file_exist_do_source $HOME/liquidprompt/liquidprompt diff --git a/.bashrc.functions b/.bashrc.functions @@ -1,5 +1,12 @@ -function __when_dir_exist_add_path { +function __when_dir_exist_do_add_path { if [ -d $1 ]; then export PATH=$1:$PATH fi } + +function __when_file_exist_do_source { + if [ -f $1 ]; then + source $1 + fi +} + diff --git a/.bashrc.paths b/.bashrc.paths @@ -1,7 +1,7 @@ # python { # added by Anaconda 1.7.0 installer { - # __when_dir_exist_add_path $HOME/anaconda/bin + # __when_dir_exist_do_add_path $HOME/anaconda/bin # } @@ -30,7 +30,7 @@ # elixirlang { - __when_dir_exist_add_path $HOME/.local/opt/elixir-0.12.4/bin + __when_dir_exist_do_add_path $HOME/.local/opt/elixir-0.12.4/bin # } @@ -49,24 +49,30 @@ # haskell { - __when_dir_exist_add_path $HOME/.cabal/bin:$PATH + __when_dir_exist_do_add_path $HOME/.cabal/bin # } # .local { - __when_dir_exist_add_path $HOME/.local/bin:$PATH + __when_dir_exist_do_add_path $HOME/.local/bin + +# } + +# bin { + + __when_dir_exist_do_add_path $HOME/bin # } # git-annex { - __when_dir_exist_add_path $HOME/.local/opt/git-annex.linux + __when_dir_exist_do_add_path $HOME/.local/opt/git-annex.linux # } # gem { - __when_dir_exist_add_path $HOME/.gem/ruby/1.9.1/bin + __when_dir_exist_do_add_path $HOME/.gem/ruby/1.9.1/bin # }