Module hilbish.history

Sidebar

  • Lunacolors
  • Introduction
  • Completions
  • Frequently Asked Questions
  • Getting Started
  • Options
  • Features
  • Runner Mode
  • Notification
  • Signals
  • Signal
  • Command
  • Hilbish
  • Vim Mode
  • Actions
  • Module bait
  • Module terminal
  • API
  • Module fs
  • Module commander
  • Module snail
  • Module hilbish.aliases
  • Module hilbish.abbr
  • Module hilbish
  • Module hilbish.userDir
  • Module hilbish.messages
  • Module hilbish.runner
  • Module hilbish.history
  • Module hilbish.jobs
  • Module hilbish.editor
  • Module hilbish.module
  • Module hilbish.os
  • Module hilbish.completion
  • Module hilbish.timers
  • Module dirs
  • Nature
  • Module doc

Module hilbish.history

Introduction

The history interface deals with command history. This includes the ability to override functions to change the main method of saving history.

Functions

add(cmd) Adds a command to the history.
all() -> table Retrieves all history as a table.
clear() Deletes all commands from the history.
get(index) Retrieves a command from the history based on the index.
size() -> number Returns the amount of commands in the history.

hilbish.history.add(cmd)

Adds a command to the history.

Parameters

string cmd


hilbish.history.all() -> table

Retrieves all history as a table.

Parameters

This function has no parameters.


hilbish.history.clear()

Deletes all commands from the history.

Parameters

This function has no parameters.


hilbish.history.get(index)

Retrieves a command from the history based on the index.

Parameters

number index


hilbish.history.size() -> number

Returns the amount of commands in the history.

Parameters

This function has no parameters.