Show More
@@ -157,6 +157,7 b' class HistoryManager(Configurable):' | |||||
157 |
|
157 | |||
158 | def get_hist_tail(self, n=10, raw=True, output=False): |
|
158 | def get_hist_tail(self, n=10, raw=True, output=False): | |
159 | """Get the last n lines from the history database.""" |
|
159 | """Get the last n lines from the history database.""" | |
|
160 | self.writeout_cache() | |||
160 | cur = self._get_hist_sql("ORDER BY session DESC, line DESC LIMIT ?", |
|
161 | cur = self._get_hist_sql("ORDER BY session DESC, line DESC LIMIT ?", | |
161 | (n,), raw=raw, output=output) |
|
162 | (n,), raw=raw, output=output) | |
162 | return reversed(list(cur)) |
|
163 | return reversed(list(cur)) | |
@@ -172,6 +173,7 b' class HistoryManager(Configurable):' | |||||
172 | tosearch = "source_raw" if raw else "source" |
|
173 | tosearch = "source_raw" if raw else "source" | |
173 | if output: |
|
174 | if output: | |
174 | tosearch = "history." + tosearch |
|
175 | tosearch = "history." + tosearch | |
|
176 | self.writeout_cache() | |||
175 | return self._get_hist_sql("WHERE %s GLOB ?" % tosearch, (pattern,), |
|
177 | return self._get_hist_sql("WHERE %s GLOB ?" % tosearch, (pattern,), | |
176 | raw=raw, output=output) |
|
178 | raw=raw, output=output) | |
177 |
|
179 |
General Comments 0
You need to be logged in to leave comments.
Login now