# cp.console.history

Console History Manager.

Based on code by @asmagill https://github.com/asmagill/hammerspoon-config-take2/blob/master/utils/_actions/consoleHistory.lua


# API Overview

Functions - API calls offered directly by the extension

  • clearHistory
  • history
  • init
  • pruneHistory
  • retrieveHistory
  • saveHistory

Fields - Variables which can only be accessed from an object returned by a constructor

  • cache

# API Documentation

# Functions

# clearHistory

Signature cp.console.history.clearHistory() -> none
Type Function
Description Clears the Console History.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 62

# history

Signature cp.console.history.history(toFind) -> none
Type Function
Description Gets a history item.
Parameters
  • toFind - Number of the item to find.
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 128

# init

Signature cp.console.history.init() -> self
Type Function
Description Initialise the module.
Parameters
  • None
Returns
  • Self
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 164

# pruneHistory

Signature cp.console.history.pruneHistory() -> number
Type Function
Description Prune History
Parameters
  • None
Returns
  • Current History Count
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 113

# retrieveHistory

Signature cp.console.history.retrieveHistory() -> none
Type Function
Description Retrieve's the Console History.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 97

# saveHistory

Signature cp.console.history.saveHistory() -> none
Type Function
Description Saves the Console History.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/extensions/cp/console/history.lua line 75

# Fields

# cache

Signature cp.console.history.cache <cp.prop: table>
Type Field
Description Console History Cache
Notes None
Source src/extensions/cp/console/history.lua line 36