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):
|
def __init__(self):
|
||||||
plugin.Plugin.__init__(self)
|
plugin.Plugin.__init__(self)
|
||||||
self.help = "The command line interface"
|
self.help = "The command line interface"
|
||||||
self.usage = "cli [prompt]"
|
self.usage = "cli [hist, maxhist, prompt]"
|
||||||
|
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
|
@ -54,8 +54,11 @@ class Plugin(plugin.Plugin):
|
||||||
if args[0]=="prompt":
|
if args[0]=="prompt":
|
||||||
settings.set("prompt",args[1]+" ")
|
settings.set("prompt",args[1]+" ")
|
||||||
elif args[0]=="maxhist":
|
elif args[0]=="maxhist":
|
||||||
settings.set("maxhist",int(args[1]))
|
if len(args) == 1:
|
||||||
elif args[0]=="history":
|
write(settings.get("maxhist"))
|
||||||
|
else:
|
||||||
|
settings.set("maxhist",int(args[1]))
|
||||||
|
elif args[0]=="hist":
|
||||||
cline.history.show()
|
cline.history.show()
|
||||||
else:
|
else:
|
||||||
write(self.usage)
|
write(self.usage)
|
Loading…
Reference in New Issue