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 | |
| 7 | # Load all files |
| 8 | |
Robert R Evans | 070107a | 2010-10-02 15:23:57 -0700 | [diff] [blame] | 9 | # Themes |
| 10 | THEMES="${BASH}/themes/*.bash" |
| 11 | for config_file in $THEMES |
| 12 | do |
| 13 | source $config_file |
| 14 | done |
| 15 | |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 16 | # Library |
| 17 | LIB="${BASH}/lib/*.bash" |
| 18 | for config_file in $LIB |
| 19 | do |
| 20 | source $config_file |
| 21 | done |
| 22 | |
| 23 | # Tab Completion |
| 24 | COMPLETION="${BASH}/completion/*.bash" |
| 25 | for config_file in $COMPLETION |
| 26 | do |
| 27 | source $config_file |
| 28 | done |
| 29 | |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 30 | unset config_file |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 31 | # Plugins |
| 32 | PLUGINS="${BASH}/plugins/*.bash" |
| 33 | for config_file in $PLUGINS |
| 34 | do |
| 35 | source $config_file |
| 36 | done |
| 37 | |
Robert R Evans | 9c7cd9a | 2010-10-02 11:55:34 -0700 | [diff] [blame] | 38 | # Functions |
| 39 | FUNCTIONS="${BASH}/functions/*.bash" |
| 40 | for config_file in $FUNCTIONS |
| 41 | do |
| 42 | source $config_file |
| 43 | done |
| 44 | |
| 45 | # Custom |
| 46 | CUSTOM="${BASH}/custom/*.bash" |
| 47 | for config_file in $CUSTOM |
| 48 | do |
| 49 | source $config_file |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 50 | done |
| 51 | |
Robert R Evans | 70c3b52 | 2010-10-03 11:50:22 -0700 | [diff] [blame] | 52 | export PS1=$PROMPT |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 53 | |
Robert R Evans | c9da086 | 2010-10-06 17:27:55 -0700 | [diff] [blame] | 54 | |
| 55 | # Adding Support for other OSes |
| 56 | PREVIEW="less" |
| 57 | [ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview" |
| 58 | [ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app" |
| 59 | |
| 60 | |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 61 | # |
| 62 | # Custom Help |
| 63 | |
| 64 | function bash-it() { |
| 65 | echo "Welcome to Bash It!" |
| 66 | echo |
| 67 | echo "Here is a list of commands you can use to get help screens for specific pieces of Bash it:" |
| 68 | echo |
| 69 | echo " rails-help This will list out all the aliases you can use with rails." |
| 70 | echo " git-help This will list out all the aliases you can use with git." |
Robert R Evans | 5e0e86f | 2010-10-02 15:29:23 -0700 | [diff] [blame] | 71 | echo " aliases-help Generic list of aliases." |
| 72 | |
Robert R Evans | a7d1ee0 | 2010-10-02 15:04:24 -0700 | [diff] [blame] | 73 | echo |
| 74 | } |