blob: 0d42fcc926d4432c23fa657c111cc1a681ee0f8a [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
17 source $config_file
18done
19
20# Tab Completion
21COMPLETION="${BASH}/completion/*.bash"
22for config_file in $COMPLETION
23do
24 source $config_file
25done
26
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070027# Plugins
28PLUGINS="${BASH}/plugins/*.bash"
29for config_file in $PLUGINS
30do
31 source $config_file
32done
33
Robert R Evans2010f012010-10-10 09:24:19 -070034# Aliases
35FUNCTIONS="${BASH}/aliases/*.bash"
Robert R Evans9c7cd9a2010-10-02 11:55:34 -070036for config_file in $FUNCTIONS
37do
38 source $config_file
39done
40
41# Custom
42CUSTOM="${BASH}/custom/*.bash"
43for config_file in $CUSTOM
44do
45 source $config_file
Robert R Evansa7d1ee02010-10-02 15:04:24 -070046done
47
Robert R Evans2010f012010-10-10 09:24:19 -070048
49unset config_file
Robert R Evans70c3b522010-10-03 11:50:22 -070050export PS1=$PROMPT
Robert R Evansa7d1ee02010-10-02 15:04:24 -070051
Robert R Evansc9da0862010-10-06 17:27:55 -070052
53# Adding Support for other OSes
54PREVIEW="less"
55[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview"
56[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app"
57
58
Robert R Evansa7d1ee02010-10-02 15:04:24 -070059#
60# Custom Help
61
62function bash-it() {
63 echo "Welcome to Bash It!"
64 echo
65 echo "Here is a list of commands you can use to get help screens for specific pieces of Bash it:"
66 echo
67 echo " rails-help This will list out all the aliases you can use with rails."
68 echo " git-help This will list out all the aliases you can use with git."
Mark Szymanskie6fb7032010-10-31 15:32:22 -050069 echo " todo-help This will list out all the aliases you can use with todo.txt-cli"
Robert R Evans5e0e86f2010-10-02 15:29:23 -070070 echo " aliases-help Generic list of aliases."
Robert R Evansa7d1ee02010-10-02 15:04:24 -070071 echo
Mark Szymanskie6fb7032010-10-31 15:32:22 -050072}