##// END OF EJS Templates
Small changes as suggested by Fernando.
Thomas Kluyver -
Show More
@@ -55,6 +55,10 b' class HistoryManager(object):'
55 55 # ShadowHist instance with the actual shadow history
56 56 shadow_hist = None
57 57
58 # Offset so the first line of the current session is #1. Can be
59 # updated after loading history from file.
60 session_offset = -1
61
58 62 # Private interface
59 63 # Variables used to store the three last inputs from the user. On each new
60 64 # history update, we populate the user's namespace with these, shifted as
@@ -69,8 +73,12 b' class HistoryManager(object):'
69 73 def __init__(self, shell, load_history=False):
70 74 """Create a new history manager associated with a shell instance.
71 75
72 If load_history is true, it will load the history from file and set the
73 session offset so that the next line typed can be retrieved as #1.
76 Parameters
77 ----------
78 load_history: bool, optional
79 If True, history will be loaded from file, and the session
80 offset set, so that the next line entered can be retrieved
81 as #1.
74 82 """
75 83 # We need a pointer back to the shell for various tasks.
76 84 self.shell = shell
@@ -82,9 +90,6 b' class HistoryManager(object):'
82 90 # it was exactly typed in by the user, with %hist -r.
83 91 self.input_hist_raw = []
84 92
85 # Offset so the first line of the current session is #1
86 self.session_offset = -1
87
88 93 # list of visited directories
89 94 try:
90 95 self.dir_hist = [os.getcwd()]
General Comments 0
You need to be logged in to leave comments. Login now