comparison cmd2.py @ 314:0687bb650118

begin new docs
author catherine@dellzilla
date Wed, 10 Feb 2010 14:07:01 -0500
parents e9f9dc712651
children de23e595bb5c
comparison
equal deleted inserted replaced
313:e9f9dc712651 314:0687bb650118
982 keepstate.restore() 982 keepstate.restore()
983 983
984 def do_history(self, arg): 984 def do_history(self, arg):
985 """history [arg]: lists past commands issued 985 """history [arg]: lists past commands issued
986 986
987 no arg -> list all 987 | no arg: list all
988 arg is integer -> list one history item, by index 988 | arg is integer: list one history item, by index
989 arg is string -> string search 989 | arg is string: string search
990 arg is /enclosed in forward-slashes/ -> regular expression search 990 | arg is /enclosed in forward-slashes/: regular expression search
991 """ 991 """
992 if arg: 992 if arg:
993 history = self.history.get(arg) 993 history = self.history.get(arg)
994 else: 994 else:
995 history = self.history 995 history = self.history