histm

package
v0.2.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HistList

func HistList() (string, error)

Types

type Histlist

type Histlist struct {

	// list of commands lines (deduplicated)
	List []string
	// lookup: cmdLine -> last index
	LastIndex map[string]int
}

Histlist is a deduplicated list of cmdLines

func Copy

func Copy(hl Histlist) Histlist

Copy Histlist

func LoadCmdLinesFromBashFile

func LoadCmdLinesFromBashFile(fname string) Histlist

LoadCmdLinesFromBashFile loads cmdlines from bash history file

func LoadCmdLinesFromZshFile

func LoadCmdLinesFromZshFile(fname string) Histlist

LoadCmdLinesFromZshFile loads cmdlines from zsh history file

func New

func New() Histlist

New Histlist

func (*Histlist) AddCmdLine

func (h *Histlist) AddCmdLine(cmdLine string)

AddCmdLine to the histlist

func (*Histlist) AddHistlist

func (h *Histlist) AddHistlist(h2 Histlist)

AddHistlist contents of another histlist to this histlist

func (*Histlist) Reverse

func (h *Histlist) Reverse()

AddHistlist contents of another histlist to this histlist

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL