mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Docs: Updated History Backend tutorial
This commit is contained in:
parent
b44dc70af7
commit
70406ad8b6
2 changed files with 27 additions and 4 deletions
|
@ -22,10 +22,10 @@ Here is a minimal history backend to start with:
|
|||
def append(self, cmd):
|
||||
pass
|
||||
|
||||
def items(self):
|
||||
def items(self, newest_first=False):
|
||||
yield {'inp': 'couchdb in action', 'ts': 1464652800, 'ind': 0}
|
||||
|
||||
def all_items(self):
|
||||
def all_items(self, newest_first=False):
|
||||
return self.items()
|
||||
|
||||
def info(self):
|
||||
|
@ -189,10 +189,10 @@ Retrieve History Items
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
def items(self):
|
||||
def items(self, newest_first=False):
|
||||
yield from self._get_db_items(self.sessionid)
|
||||
|
||||
def all_items(self):
|
||||
def all_items(self, newest_first=False):
|
||||
yield from self._get_db_items()
|
||||
|
||||
These two methods are responsible for getting history items for the current
|
||||
|
|
23
news/fix_history_tutorial.rst
Normal file
23
news/fix_history_tutorial.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Updated History Backend tutorial.
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
Loading…
Add table
Reference in a new issue