.DS_Store
custom/*.bash
!custom/example.bash
-.rvmrc
\ No newline at end of file
+.rvmrc
+aliases/custom.aliases.bash
+lib/custom.bash
+plugins/custom.plugins.bash
\ No newline at end of file
'Bash it' is a mash up of my own bash commands and scripts, other bash stuff I have found and a shameless ripoff of oh-my-zsh. :)
-From what I remember, I've incorporated things I have found from the following:
-
-* oh-my-zsh (http://github.com/robbyrussell/oh-my-zsh)
-* Steve Losh (http://stevelosh.com/)
-
Includes some autocompletion tools, theming support, aliases, custom functions, and more.
## Install
</code></pre>
-I'm working on adding various custom help screens to bash it. Currently, bash it has the following commands to show help screens:
+## Help Screens
<pre><code>
bash-it (will show all the help commands)
## Your Custom scripts, aliases, and functions
-If you have custom stuff that you don't want committed to bash it, put those scripts into the custom directory. It is automatically ignored by git.
+For custom scripts, and aliases, you can create the following files and they will be ignored by the git repo:
+
+* aliases/custom.aliases.bash
+* lib/custom.bash
+* plugins/custom.plugins.bash
+
+and anything in the custom directory will be ignored with the exception of custom/example.bash.
## Themes
-Currently, there is only 1 theme, 'bobby'. There is a base.theme.bash that includes various colors that can then be used to create custom themes. There is support for git in the prompt: showing what branch you're on, if you've committed locally or not, etc. I'm working on adding mercurial support as well.
+There are a few bash-it themes, but I'm hoping the community will jump in and create their own custom prompts and share their creations with everyone else by submitting a pull request to me (revans).
+
+## Help out
+
+I think all of us have our own custom scripts that we have added over time and so following in the footsteps of oh-my-zsh, bash-it was created as a framework for those who choose to use bash as their shell. As a community, I'm excited to see what everyone else has in their custom toolbox and am hoping that they'll share it with everyone by submitting a pull request to bash-it.
+
+So, if you have contributions to bash-it, please send me a pull request and I'll take a look at it and commit it to the repo as long as it looks good. If you do change an existing command, please give an explanation as to why. That will help a lot when I merge your changes in. Thanks, and happing bashing!
+
+
+## Contributors
-## Help out!
+If you are submitting a pull request, please add your name to the list.
-Just like oh-my-zsh, 'bash it' is meant for the community. If you have things to add, want to add a theme, etc. please fork this project and send me a pull request.
\ No newline at end of file
+* Robert Evans
+* David Bradford
+* Rich Manalang
+* Piotr Usewicz
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+alias em="emacs"
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+# Desktop Programs
+alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'"
+alias photoshop="open -a '/Applications/Adobe Photoshop CS3/Adobe Photoshop.app'"
+alias preview="open -a '$PREVIEW'"
+alias xcode="open -a '/Developer/Applications/Xcode.app'"
+alias filemerge="open -a '/Developer/Applications/Utilities/FileMerge.app'"
+alias safari="open -a safari"
+alias firefox="open -a firefox"
+alias dashcode="open -a dashcode"
+alias f='open -a Finder '
+
+if [ -s /usr/bin/firefox ] ; then
+ unalias firefox
+fi
+
--- /dev/null
+#!/bin/bash
+
+alias v='mvim --remote-tab'
\ No newline at end of file
source $config_file
done
-unset config_file
# Plugins
PLUGINS="${BASH}/plugins/*.bash"
for config_file in $PLUGINS
source $config_file
done
-# Functions
-FUNCTIONS="${BASH}/functions/*.bash"
+# Aliases
+FUNCTIONS="${BASH}/aliases/*.bash"
for config_file in $FUNCTIONS
do
source $config_file
source $config_file
done
+
+unset config_file
export PS1=$PROMPT
+++ /dev/null
-#!/bin/bash
-
-function ips {
- ifconfig | grep "inet " | awk '{ print $2 }'
-}
-
-function myip {
- res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
- echo "Your public IP is: ${bold_green} $res ${normal}"
-}
-
-
-# View man documentation in Preview
-pman () {
- man -t "${1}" | open -f -a $PREVIEW
-}
-
-
-pcurl() {
- curl "${1}" | open -f -a $PREVIEW
-}
-
-pri() {
- ri -T "${1}" | open -f -a $PREVIEW
-}
-
-
-# disk usage per directory
-usage ()
-{
- if [ $1 ]
- then
- du -hd $1
- else
- du -hd 1
- fi
-}
\ No newline at end of file
# resize history size
export HISTSIZE=5000
-
export AUTOFEATURE=true autotest
function rh {
#!/bin/bash
-# Desktop Programs
-alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'"
-alias photoshop="open -a '/Applications/Adobe Photoshop CS3/Adobe Photoshop.app'"
-alias preview="open -a '$PREVIEW'"
-alias xcode="open -a '/Developer/Applications/Xcode.app'"
-alias filemerge="open -a '/Developer/Applications/Utilities/FileMerge.app'"
-alias safari="open -a safari"
-alias firefox="open -a firefox"
-alias dashcode="open -a dashcode"
-
-
-if [ -s /usr/bin/firefox ] ; then
- unalias firefox
-fi
\ No newline at end of file
+# For generic functions.
+
+function ips {
+ ifconfig | grep "inet " | awk '{ print $2 }'
+}
+
+function myip {
+ res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
+ echo "Your public IP is: ${bold_green} $res ${normal}"
+}
+
+
+# View man documentation in Preview
+pman () {
+ man -t "${1}" | open -f -a $PREVIEW
+}
+
+
+pcurl() {
+ curl "${1}" | open -f -a $PREVIEW
+}
+
+pri() {
+ ri -T "${1}" | open -f -a $PREVIEW
+}
+
+
+# disk usage per directory
+usage ()
+{
+ if [ $1 ]
+ then
+ du -hd $1
+ else
+ du -hd 1
+ fi
+}
\ No newline at end of file
+++ /dev/null
-alias em="emacs"
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+hg_dirty() {
+ hg status --no-color 2> /dev/null \
+ | awk '$1 == "?" { print "?" } $1 != "?" { print "!" }' \
+ | sort | uniq | head -c1
+}
+
+hg_in_repo() {
+ [[ `hg branch 2> /dev/null` ]] && echo 'on '
+}
+
+hg_branch() {
+ hg branch 2> /dev/null
+}
\ No newline at end of file
#!/bin/bash
-alias f='open -a Finder '
-
function tab() {
osascript 2>/dev/null <<EOF
tell application "System Events"
+++ /dev/null
-#!/bin/bash
-
-alias v='mvim --remote-tab'
-