From: Florian Baumann Date: Mon, 8 Nov 2010 20:31:11 +0000 (+0100) Subject: added plugins-help message X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=cecbae54e533c619dca589c44300011d0307ea0e;p=common%2Fbash_it.git added plugins-help message --- diff --git a/plugins/base.plugin.bash b/plugins/base.plugin.bash index b1706e9..1e73df5 100644 --- a/plugins/base.plugin.bash +++ b/plugins/base.plugin.bash @@ -57,12 +57,30 @@ usage () } # One thing todo - function t() { if [[ "$*" == "" ]] ; then cat ~/.t else echo "$*" > ~/.t fi - } +} + +# List all plugins and functions defined by bash-it +function plugins-help() { + + echo "bash-it Plugins Help-Message" + echo + + set | grep "()" \ + | sed -e "/^_/d" | grep -v "BASH_ARGC=()" \ + | sed -e "/^\s/d" | grep -v "BASH_LINENO=()" \ + | grep -v "BASH_ARGV=()" \ + | grep -v "BASH_SOURCE=()" \ + | grep -v "DIRSTACK=()" \ + | grep -v "GROUPS=()" \ + | grep -v "BASH_CMDS=()" \ + | grep -v "BASH_ALIASES=()" \ + | sed -e "s/()//" +} +