Commit 42c739c0 authored by Stavros Sachtouris's avatar Stavros Sachtouris

START FEAT. DEV. cmd accessibility in shell

shell commands should be accessible from all contexts e.g.:
[kamaki] server   #new context
[server] /config list   #call command from top context
...
[server] ../config list   #call command from previous context

This feature will be developed in following commits
parent db950b10
......@@ -57,6 +57,21 @@ class Shell(Cmd):
_history = None
undoc_header = 'interactive shell commands:'
def precmd(self, line):
if line.startswith('/'):
print('NEED TO GO TOP')
print('\tsave context')
print('\tload initial context')
print('\treturn line')
print('\tMaybe postcmd can do the trick')
elif line.startswith('../'):
print('NEED TO DO STUFF')
print('\tsave context')
print('\tload initial context')
print('\treturn line')
print('\tMaybe postcmd can do the trick')
return line
def greet(self, version):
print('kamaki v%s - Interactive Shell\n\t(exit or ^D to exit)\n'\
% version)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment