2022-12-15 04:00:54 +00:00
|
|
|
---
|
2023-08-26 15:30:51 +00:00
|
|
|
title: Module hilbish.history
|
2022-12-15 04:00:54 +00:00
|
|
|
description: command history
|
|
|
|
layout: doc
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: "API"
|
|
|
|
---
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
The history interface deals with command history.
|
|
|
|
This includes the ability to override functions to change the main
|
|
|
|
method of saving history.
|
|
|
|
|
|
|
|
## Functions
|
2023-09-02 18:18:40 +00:00
|
|
|
|||
|
|
|
|
|----|----|
|
|
|
|
|<a href="#history.add">add(cmd)</a>|Adds a command to the history.|
|
|
|
|
|<a href="#history.all">all() -> table</a>|Retrieves all history.|
|
|
|
|
|<a href="#history.clear">clear()</a>|Deletes all commands from the history.|
|
|
|
|
|<a href="#history.get">get(idx)</a>|Retrieves a command from the history based on the `idx`.|
|
|
|
|
|<a href="#history.size">size() -> number</a>|Returns the amount of commands in the history.|
|
|
|
|
|
|
|
|
<hr><div id='history.add'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.history.add(cmd)
|
|
|
|
<a href="#history.add" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
|
2022-12-15 04:00:54 +00:00
|
|
|
Adds a command to the history.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='history.all'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.history.all() -> table
|
|
|
|
<a href="#history.all" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-02-07 22:19:24 +00:00
|
|
|
Retrieves all history.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='history.clear'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.history.clear()
|
|
|
|
<a href="#history.clear" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2023-02-07 22:19:24 +00:00
|
|
|
|
2022-12-15 04:00:54 +00:00
|
|
|
Deletes all commands from the history.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='history.get'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.history.get(idx)
|
|
|
|
<a href="#history.get" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
Retrieves a command from the history based on the `idx`.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='history.size'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.history.size() -> number
|
|
|
|
<a href="#history.size" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
Returns the amount of commands in the history.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div>
|