Hilbish/docs/api/hilbish/hilbish.history.md

41 lines
900 B
Markdown
Raw Normal View History

---
title: Module hilbish.history
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
### hilbish.history.add(cmd)
Adds a command to the history.
#### Parameters
This function has no parameters.
### hilbish.history.all() -> table
2023-02-07 22:19:24 +00:00
Retrieves all history.
#### Parameters
This function has no parameters.
2023-02-07 22:19:24 +00:00
### hilbish.history.clear()
Deletes all commands from the history.
#### Parameters
This function has no parameters.
### hilbish.history.get(idx)
Retrieves a command from the history based on the `idx`.
#### Parameters
This function has no parameters.
### hilbish.history.size() -> number
Returns the amount of commands in the history.
#### Parameters
This function has no parameters.