Minor changes to cli.py

This commit is contained in:
bjschuma 2010-01-29 17:24:00 -05:00
parent f3bb2626ae
commit 6f06e3cc62
1 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class Plugin(plugin.Plugin):
def __init__(self):
plugin.Plugin.__init__(self)
self.help = "The command line interface"
self.usage = "cli [prompt]"
self.usage = "cli [hist, maxhist, prompt]"
def open(self):
@ -54,8 +54,11 @@ class Plugin(plugin.Plugin):
if args[0]=="prompt":
settings.set("prompt",args[1]+" ")
elif args[0]=="maxhist":
settings.set("maxhist",int(args[1]))
elif args[0]=="history":
if len(args) == 1:
write(settings.get("maxhist"))
else:
settings.set("maxhist",int(args[1]))
elif args[0]=="hist":
cline.history.show()
else:
write(self.usage)