blob: bfa6664bc83cdf64213efc43ca32f89464fd4a05 [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
Robert R Evans79e50292010-10-12 14:14:20 -07007# Load the framework
Robert R Evans9c7cd9a2010-10-02 11:55:34 -07008
John Schulzd5645e72010-11-09 23:21:19 -05009# Load colors first so they can be use in base theme
10source "${BASH}/themes/colors.theme.bash"
11source "${BASH}/themes/base.theme.bash"
Robert R Evans070107a2010-10-02 15:23:57 -070012
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070013# Library
14LIB="${BASH}/lib/*.bash"
15for config_file in $LIB
16do
Jon Schewe7d18ccc2011-10-09 20:44:29 -050017 if [ -e "${config_file}" ]; then
18 source $config_file
19 fi
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070020done
21
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050022# Load enabled aliases, completion, plugins
23for file_type in "aliases" "completion" "plugins"
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070024do
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050025 if [ ! -d "${BASH}/${file_type}/enabled" ]
26 then
Noorul Islam K M8e0b6682011-08-22 12:35:00 +053027 continue
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050028 fi
29 FILES="${BASH}/${file_type}/enabled/*.bash"
30 for config_file in $FILES
31 do
Jon Schewe7d18ccc2011-10-09 20:44:29 -050032 if [ -e "${config_file}" ]; then
33 source $config_file
34 fi
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050035 done
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070036done
37
Travis Swicegoodd7cfa8b2011-06-21 09:31:26 -050038# Load any custom aliases that the user has added
Mark Szymanski78270b32011-06-17 11:22:39 -050039if [ -e "${BASH}/aliases/custom.aliases.bash" ]
40then
41 source "${BASH}/aliases/custom.aliases.bash"
42fi
Mark Szymanski50179fd2011-06-13 22:05:45 -050043
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070044# Custom
45CUSTOM="${BASH}/custom/*.bash"
46for config_file in $CUSTOM
47do
Jon Schewe7d18ccc2011-10-09 20:44:29 -050048 if [ -e "${config_file}" ]; then
49 source $config_file
50 fi
Robert R Evansa7d1ee02010-10-02 15:04:24 -070051done
52
Robert R Evans2010f012010-10-10 09:24:19 -070053
54unset config_file
John Schulz6e7f4232010-11-11 11:57:47 -050055if [[ $PROMPT ]]; then
56 export PS1=$PROMPT
57fi
Robert R Evansc9da0862010-10-06 17:27:55 -070058
59# Adding Support for other OSes
60PREVIEW="less"
61[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview"
62[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app"
63
Mark Szymanski9ad79642011-06-24 17:49:19 -050064# Load all the Jekyll stuff
65
66if [ -e $HOME/.jekyllconfig ]
67then
68 . $HOME/.jekyllconfig
69fi
70
Robert R Evansc9da0862010-10-06 17:27:55 -070071
Robert R Evansa7d1ee02010-10-02 15:04:24 -070072#
73# Custom Help
74
75function bash-it() {
76 echo "Welcome to Bash It!"
77 echo
78 echo "Here is a list of commands you can use to get help screens for specific pieces of Bash it:"
79 echo
80 echo " rails-help This will list out all the aliases you can use with rails."
81 echo " git-help This will list out all the aliases you can use with git."
Mark Szymanskie6fb7032010-10-31 15:32:22 -050082 echo " todo-help This will list out all the aliases you can use with todo.txt-cli"
Mark Szymanskib7a0cb62011-06-05 20:45:53 -050083 echo " brew-help This will list out all the aliases you can use with Homebrew"
Robert R Evans5e0e86f2010-10-02 15:29:23 -070084 echo " aliases-help Generic list of aliases."
Florian Baumannbd224852010-11-08 21:52:49 +010085 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 -070086 echo
Mark Szymanskie6fb7032010-10-31 15:32:22 -050087}