Create the concept of enabled plugins

This allows users to disable a plugin without completely removing it.
Instead, they simply remove the `plugins/enabled/*.bash` file for the
plugin they want to disable.  This continues the concept of "everything
on" while providing greater flexibility to future users.

It might be a good idea to allow turning these off by default in the
future and allowing not only the `plugins/enabled/*.bash` files but also
an array of `<plugin_name>` values that would search for
`plugins/available/<plugin_name>.plugin.bash` to enable them.  That
method would make it easier for people custom tune their plugins from
within their `.bash_profile` script.
This commit is contained in:
Travis Swicegood
2011-05-02 23:05:59 -05:00
parent 1aedbd6350
commit ffa45b0391
41 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
#!/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
}