|
1 | 1 | import os |
2 | 2 | import datetime |
3 | 3 |
|
| 4 | +import lib.banner |
4 | 5 | import lib.settings |
5 | 6 | import lib.output |
6 | 7 | import lib.errors |
@@ -42,6 +43,8 @@ class object for the main terminal of the program |
42 | 43 | "external", |
43 | 44 | # reset API tokens |
44 | 45 | "reset", "tokens", |
| 46 | + # show the version number |
| 47 | + "ver", "version", |
45 | 48 | # easter eggs! |
46 | 49 | "idkwhatimdoing", "ethics", "skid" |
47 | 50 | ] |
@@ -127,6 +130,12 @@ def get_choice(self): |
127 | 130 | retval = ("unknown", original_choice) |
128 | 131 | return retval |
129 | 132 |
|
| 133 | + def do_show_version_number(self): |
| 134 | + """ |
| 135 | + display the current version number |
| 136 | + """ |
| 137 | + lib.output.info("your current version number: {}".format(lib.banner.VERSION)) |
| 138 | + |
130 | 139 | def do_display_external(self): |
131 | 140 | """ |
132 | 141 | display all external commands |
@@ -402,7 +411,7 @@ def terminal_main_display(self, tokens, extra_commands=None, save_history=True): |
402 | 411 | terminal main display |
403 | 412 | """ |
404 | 413 | lib.output.warning( |
405 | | - "no arguments have been passed, dropping into terminal session. " |
| 414 | + "no arguments have been parsed at run time, dropping into terminal session. " |
406 | 415 | "to get help type `help` to quit type `exit/quit` to get help on " |
407 | 416 | "a specific command type `command help`" |
408 | 417 | ) |
@@ -462,6 +471,8 @@ def terminal_main_display(self, tokens, extra_commands=None, save_history=True): |
462 | 471 | self.do_quit_terminal(save_history=save_history) |
463 | 472 | elif any(c in choice for c in ("view", "gathered")): |
464 | 473 | self.do_view_gathered() |
| 474 | + elif any(c in choice for c in ("ver", "version")): |
| 475 | + self.do_show_version_number() |
465 | 476 | elif "single" in choice: |
466 | 477 | if "help" in choice_data_list: |
467 | 478 | print(self.do_add_single_host.__doc__) |
|
0 commit comments