Documentation ¶
Overview ¶
Package history provides utilities for the command history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEndOfHistory = errors.New("end of history")
Functions ¶
This section is empty.
Types ¶
type Fuser ¶
Fuser provides a unified view into a shared storage-backed command history and per-session history.
func (*Fuser) SessionCmds ¶
type Store ¶
type Store interface { NextCmdSeq() (int, error) AddCmd(cmd string) (int, error) Cmds(from, upto int) ([]string, error) PrevCmd(upto int, prefix string) (int, string, error) }
Store is the interface of the storage backend.
type Walker ¶
type Walker struct {
// contains filtered or unexported fields
}
Walker is used for walking through history entries with a given (possibly empty) prefix, skipping duplicates entries.
func (*Walker) CurrentCmd ¶
CurrentSeq returns the content of the current entry.
func (*Walker) CurrentSeq ¶
CurrentSeq returns the sequence number of the current entry.
Click to show internal directories.
Click to hide internal directories.