From: W. Trevor King Date: Thu, 27 Nov 2008 12:35:40 +0000 (-0500) Subject: Added --commands option to be to help with bash completion. X-Git-Tag: 1.0.0~104 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c70ddc0a08c70435d42cafa4f731af2f86925e4;p=be.git Added --commands option to be to help with bash completion. A'la ditz http://gitorious.org/projects/ditz See also this good intro to bash completion http://www.debian-administration.org/articles/317 --- diff --git a/be b/be index 6be236b..2e038a5 100755 --- a/be +++ b/be @@ -24,6 +24,9 @@ __doc__ == cmdutil.help() if len(sys.argv) == 1 or sys.argv[1] in ('--help', '-h'): print cmdutil.help() +elif sys.argv[1] == '--commands': + for command, module in cmdutil.iter_commands(): + print command else: try: try: