plugins-help ()
{
- about 'list all plugins and functions defined by bash-it'
+ about 'summarize all functions defined by enabled bash-it plugins'
group 'lib'
- printf '%s\n' "bash-it plugins help"
- printf '\n'
+ # display a brief progress message...
+ printf '%s' 'please wait, building help...'
+ typeset grouplist=$(mktemp /tmp/grouplist.XXXX)
+ typeset func
+ for func in $(typeset_functions)
+ do
+ typeset group="$(typeset -f $func | metafor group)"
+ if [ -z "$group" ]; then
+ group='misc'
+ fi
+ typeset about="$(typeset -f $func | metafor about)"
+ letterpress "$about" $func >> $grouplist.$group
+ echo $grouplist.$group >> $grouplist
+ done
+ # clear progress message
+ printf '\r%s\n' ' '
typeset group
- for group in $(all_groups)
+ typeset gfile
+ for gfile in $(cat $grouplist | sort | uniq)
do
- printf '%s\n' "group: $group"
- glossary $group
+ printf '%s\n' "${gfile##*.}:"
+ cat $gfile
printf '\n'
- done
+ rm $gfile 2> /dev/null
+ done | less
+ rm $grouplist 2> /dev/null
}
all_groups ()
function jquery_install {
about 'download jquery.js into public/javascripts'
- group 'javascripts'
+ group 'javascript'
if [ -z "$1" ]
then
function jquery_ui_install {
about 'download jquery_us.js into public/javascripts'
- group 'javascripts'
+ group 'javascript'
if [ -z "$1" ]
then