blob: fd87248abedfc859caecda2921bd2103b409b337 [file] [log] [blame]
Robert R Evans76ed68d2010-10-02 12:29:17 -07001#!/bin/bash
Robert R Evans9c7cd9a2010-10-02 11:55:34 -07002# Initialize Bash It
3
4# Reload Library
5alias reload='source ~/.bash_profile'
6
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -05007# Load enabled aliases, completion, plugins
8for file_type in "aliases" "completion" "plugins"
Robert R Evans9c7cd9a2010-10-02 11:55:34 -07009do
John Schulz323ce202011-09-20 11:07:48 -040010 if [ ! -d "${BASH_IT}/${file_type}/enabled" ]
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050011 then
John Schulz323ce202011-09-20 11:07:48 -040012 continue
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050013 fi
John Schulz323ce202011-09-20 11:07:48 -040014 FILES="${BASH_IT}/${file_type}/enabled/*.bash"
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050015 for config_file in $FILES
16 do
17 source $config_file
18 done
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070019done
20
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050021# Load any custom aliases that the user has added
John Schulz323ce202011-09-20 11:07:48 -040022if [ -e "${BASH_IT}/aliases/custom.aliases.bash" ]
Mark Szymanski78270b32011-06-17 11:22:39 -050023then
John Schulz323ce202011-09-20 11:07:48 -040024 source "${BASH_IT}/aliases/custom.aliases.bash"
Mark Szymanski78270b32011-06-17 11:22:39 -050025fi
Mark Szymanski50179fd2011-06-13 22:05:45 -050026
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070027# Custom
John Schulz323ce202011-09-20 11:07:48 -040028CUSTOM="${BASH_IT}/custom/*.bash"
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070029for config_file in $CUSTOM
30do
31 source $config_file
Robert R Evansa7d1ee02010-10-02 15:04:24 -070032done
33
John Schulz7483c6d2011-10-27 19:29:34 -040034# Load colors first so they can be use in base theme
35source "${BASH_IT}/themes/colors.theme.bash"
36source "${BASH_IT}/themes/base.theme.bash"
37
38# library
39[ -z "$BASH_IT" ] && export BASH_IT=$HOME/.bash_it
40LIB="${BASH_IT}/lib/*.bash"
41for config_file in $LIB
42do
43 source $config_file
44done
Robert R Evans2010f012010-10-10 09:24:19 -070045
46unset config_file
John Schulz6e7f4232010-11-11 11:57:47 -050047if [[ $PROMPT ]]; then
48 export PS1=$PROMPT
49fi
Robert R Evansc9da0862010-10-06 17:27:55 -070050
51# Adding Support for other OSes
52PREVIEW="less"
53[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview"
54[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app"
55
Mark Szymanski9ad79642011-06-24 17:49:19 -050056# Load all the Jekyll stuff
57
58if [ -e $HOME/.jekyllconfig ]
59then
60 . $HOME/.jekyllconfig
61fi
62
Robert R Evansc9da0862010-10-06 17:27:55 -070063
Robert R Evansa7d1ee02010-10-02 15:04:24 -070064#
65# Custom Help
66
67function bash-it() {
68 echo "Welcome to Bash It!"
69 echo
70 echo "Here is a list of commands you can use to get help screens for specific pieces of Bash it:"
71 echo
72 echo " rails-help This will list out all the aliases you can use with rails."
73 echo " git-help This will list out all the aliases you can use with git."
Mark Szymanskie6fb7032010-10-31 15:32:22 -050074 echo " todo-help This will list out all the aliases you can use with todo.txt-cli"
Mark Szymanskib7a0cb62011-06-05 20:45:53 -050075 echo " brew-help This will list out all the aliases you can use with Homebrew"
Robert R Evans5e0e86f2010-10-02 15:29:23 -070076 echo " aliases-help Generic list of aliases."
Florian Baumannbd224852010-11-08 21:52:49 +010077 echo " plugins-help This will list out all the plugins and functions you can use with bash-it"
Robert R Evansa7d1ee02010-10-02 15:04:24 -070078 echo
Mark Szymanskie6fb7032010-10-31 15:32:22 -050079}