diff --git a/src/core/cli.py b/src/core/cli.py index 9bdcf8de..bba89bf6 100644 --- a/src/core/cli.py +++ b/src/core/cli.py @@ -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) \ No newline at end of file