interactive: add doc() function
... that prints the welcoming message
This commit is contained in:
parent
aba8162676
commit
f60a82557c
@ -35,6 +35,8 @@ What's in the box:
|
||||
- dump
|
||||
- append_to
|
||||
- pager
|
||||
* other:
|
||||
- doc(): print this message.
|
||||
|
||||
You can also enjoy autocompletion with <TAB>.
|
||||
"""
|
||||
@ -288,6 +290,10 @@ def stats(names=None, to=dump):
|
||||
to(reports.color_totals(BY_COLOR, names, total, summary=True))
|
||||
|
||||
|
||||
def doc(to=dump):
|
||||
to(__doc__)
|
||||
|
||||
|
||||
def interactive_setup():
|
||||
# Bind ‘TAB’ to complete
|
||||
readline.parse_and_bind('tab:complete')
|
||||
@ -319,4 +325,4 @@ def interactive_setup():
|
||||
|
||||
if __name__ == '__main__':
|
||||
interactive_setup()
|
||||
print(__doc__)
|
||||
doc()
|
||||
|
Loading…
Reference in New Issue
Block a user