Minor changes to cli.py
This commit is contained in:
parent
f3bb2626ae
commit
6f06e3cc62
|
@ -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)
|
Loading…
Reference in New Issue