Commits

Vadim Fint  committed 651c6a1

feature: show options help in './do help'

  • Participants
  • Parent commits 5423f03
  • Branches feature

Comments (0)

Files changed (2)

 @task
 def help():
     """ Show available tasks list """
-    print('Available tasks:')
+
+    from fabricate import _parsed_options
+
+    if _parsed_options is not None:
+        _parsed_options[0].print_help()
+        print('')
+
+    print('Available script functions:')
 
     tasks = []
     for name, meth in sorted(globals().iteritems()):

File tools/fabricate.py

         options, args = parser.parse_args(command_line)
     else:
         options, args = parser.parse_args()
+    global _parsed_options
     _parsed_options = (parser, options, args)
     return _parsed_options