_suffix = ']:'
cmd_tree = None
_history = None
+ undoc_header='interactive shell commands:'
def greet(self, version):
print('kamaki v%s - Interactive Shell\n\t(exit or ^D to exit)\n'%version)
def do_shell(self, line):
output = popen(line).read()
print(output)
- def help_shell(self):
- print('Execute OS shell commands')
@property
def path(self):
return subcmd.get_subnames()
self._register_method(complete_method, 'complete_%s'%cmd.name)
+ @property
+ def doc_header(self):
+ hdr = self.prompt.partition(self._prefix)[2].partition(self._suffix)[0].strip()
+ return '%s commands:'%hdr
+
def run(self, path=''):
self._history = History(_arguments['config'].get('history', 'file'))
if len(path):