Manages the shell's history.
More...
#include <history.h>
Manages the shell's history.
Definition at line 23 of file history.h.
◆ History() [1/2]
semf::esh::History::History |
( |
char * |
historyBuffer, |
|
|
size_t |
numberOfEntries, |
|
|
size_t |
lineSize |
|
) |
| |
Constructor.
- Parameters
-
historyBuffer | Buffer for storing the history. The size of this buffer should be historySize * lineSize . |
numberOfEntries | Number of history entries. |
lineSize | Size of a single history entry. |
Definition at line 18 of file history.cpp.
◆ History() [2/2]
semf::esh::History::History |
( |
const History & |
other | ) |
|
|
delete |
◆ ~History()
virtual semf::esh::History::~History |
( |
| ) |
|
|
virtualdefault |
◆ handleArrowDown()
void semf::esh::History::handleArrowDown |
( |
char |
commandBuffer[] | ) |
|
Performes a lookup based on an down-arrow key stroke.
- Parameters
-
commandBuffer | [out] Buffer to store the result. |
- Note
- It is assumed that the size of
commandBuffer
is m_lineSize
.
Definition at line 52 of file history.cpp.
◆ handleArrowUp()
void semf::esh::History::handleArrowUp |
( |
char |
commandBuffer[] | ) |
|
Performes a lookup based on an up-arrow key stroke.
- Parameters
-
commandBuffer | [out] Buffer to store the result. |
- Note
- It is assumed that the size of
commandBuffer
is m_lineSize
.
Definition at line 37 of file history.cpp.
◆ insert()
void semf::esh::History::insert |
( |
std::string_view |
command | ) |
|
Inserts a command.
- Parameters
-
Definition at line 25 of file history.cpp.