Robert R Evans | 76ed68d | 2010-10-02 12:29:17 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 2 | # Initialize Bash It |
| 3 | |
| 4 | # Reload Library |
| 5 | alias reload='source ~/.bash_profile' |
| 6 | |
Robert R Evans | 79e5029 | 2010-10-12 14:14:20 -0700 | [diff] [blame] | 7 | # Load the framework |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 8 | |
John Schulz | d5645e7 | 2010-11-09 23:21:19 -0500 | [diff] [blame] | 9 | # Load colors first so they can be use in base theme |
| 10 | source "${BASH}/themes/colors.theme.bash" |
| 11 | source "${BASH}/themes/base.theme.bash" |
Robert R Evans | 070107a | 2010-10-02 15:23:57 -0700 | [diff] [blame] | 12 | |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 13 | # Library |
| 14 | LIB="${BASH}/lib/*.bash" |
| 15 | for config_file in $LIB |
| 16 | do |
| 17 | source $config_file |
| 18 | done |
| 19 | |
| 20 | # Tab Completion |
| 21 | COMPLETION="${BASH}/completion/*.bash" |
| 22 | for config_file in $COMPLETION |
| 23 | do |
| 24 | source $config_file |
| 25 | done |
| 26 | |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 27 | # Plugins |
| 28 | PLUGINS="${BASH}/plugins/*.bash" |
| 29 | for config_file in $PLUGINS |
| 30 | do |
| 31 | source $config_file |
| 32 | done |
| 33 | |
Robert R Evans | 2010f01 | 2010-10-10 09:24:19 -0700 | [diff] [blame] | 34 | # Aliases |
| 35 | FUNCTIONS="${BASH}/aliases/*.bash" |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 36 | for config_file in $FUNCTIONS |
| 37 | do |
| 38 | source $config_file |
| 39 | done |
| 40 | |
| 41 | # Custom |
| 42 | CUSTOM="${BASH}/custom/*.bash" |
| 43 | for config_file in $CUSTOM |
| 44 | do |
| 45 | source $config_file |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 46 | done |
| 47 | |
Robert R Evans | 2010f01 | 2010-10-10 09:24:19 -0700 | [diff] [blame] | 48 | |
| 49 | unset config_file |
Robert R Evans | 70c3b52 | 2010-10-03 11:50:22 -0700 | [diff] [blame] | 50 | export PS1=$PROMPT |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 51 | |
Robert R Evans | c9da086 | 2010-10-06 17:27:55 -0700 | [diff] [blame] | 52 | |
| 53 | # Adding Support for other OSes |
| 54 | PREVIEW="less" |
| 55 | [ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview" |
| 56 | [ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app" |
| 57 | |
| 58 | |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 59 | # |
| 60 | # Custom Help |
| 61 | |
| 62 | function 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 Szymanski | e6fb703 | 2010-10-31 15:32:22 -0500 | [diff] [blame] | 69 | echo " todo-help This will list out all the aliases you can use with todo.txt-cli" |
Robert R Evans | 5e0e86f | 2010-10-02 15:29:23 -0700 | [diff] [blame] | 70 | echo " aliases-help Generic list of aliases." |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 71 | echo |
Mark Szymanski | e6fb703 | 2010-10-31 15:32:22 -0500 | [diff] [blame] | 72 | } |