fixed the help output AND: Lish got colors... :)
This commit is contained in:
parent
49bf87f254
commit
6764db13f8
1 changed files with 11 additions and 8 deletions
|
|
@ -40,7 +40,7 @@ class LishFrontend(Frontend):
|
||||||
run = True
|
run = True
|
||||||
while run:
|
while run:
|
||||||
try:
|
try:
|
||||||
commander.cmdloop("Lish - Linspector interactive shell (" + __version__ + ")")
|
commander.cmdloop("\033[92mLish - Linspector interactive shell (" + __version__ + ")\033[0m")
|
||||||
except KeyboardInterrupt, ki:
|
except KeyboardInterrupt, ki:
|
||||||
run = False
|
run = False
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
|
|
@ -133,7 +133,7 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
||||||
|
|
||||||
super(LishCommander, self).__init__()
|
super(LishCommander, self).__init__()
|
||||||
|
|
||||||
self.prompt = "<Lish>: "
|
self.prompt = "\033[94m<Lish>:\033[0m "
|
||||||
|
|
||||||
self.interface = linspectorInterface
|
self.interface = linspectorInterface
|
||||||
|
|
||||||
|
|
@ -168,11 +168,12 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
||||||
return self.get_completion(["list", "select"], text)
|
return self.get_completion(["list", "select"], text)
|
||||||
|
|
||||||
def help_hostgroup(self):
|
def help_hostgroup(self):
|
||||||
print "usage:\n\t" + \
|
print '''usage:
|
||||||
"hostgroup list\n\t\t\t" + \
|
hostgroup list
|
||||||
"prints a list of all hostgroups\n\t" + \
|
prints a list of all hostgroups
|
||||||
"hostgroup select HOSTGROUPNAME\n\t\t\t" + \
|
hostgroup select HOSTGROUPNAME
|
||||||
"select a hostgroup to make changes on it"
|
select a hostgroup to make changes on it
|
||||||
|
'''
|
||||||
|
|
||||||
def do_python(self, text):
|
def do_python(self, text):
|
||||||
exec text
|
exec text
|
||||||
|
|
@ -234,4 +235,6 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
||||||
self.help_jobs()
|
self.help_jobs()
|
||||||
|
|
||||||
def help_jobs(self):
|
def help_jobs(self):
|
||||||
print "Joblist helper functions:\n\t" + "list:\t\t\tlists all jobs"
|
print '''usage:
|
||||||
|
list lists all jobs
|
||||||
|
'''
|
||||||
Loading…
Add table
Add a link
Reference in a new issue