elvish: github.com/elves/elvish/pkg/cli/addons/histwalk Index | Files

package histwalk

import "github.com/elves/elvish/pkg/cli/addons/histwalk"

Package histwalk implements the history walking addon.

Index

Package Files

histwalk.go

Variables

var ErrHistWalkInactive = errors.New("the histwalk addon is not active")

func Accept Uses

func Accept(app cli.App)

Accept closes the histwalk addon, accepting the current shown command. It does nothing if the histwalk addon is not active.

func Close Uses

func Close(app cli.App)

Close closes the histwalk addon. It does nothing if the histwalk addon is not active.

func Next Uses

func Next(app cli.App) error

Next walks to the next entry in history. It returns ErrHistWalkInactive if the histwalk addon is not active, and histutil.ErrEndOfHistory if it would go over the end.

func Prev Uses

func Prev(app cli.App) error

Prev walks to the previous entry in history. It returns ErrHistWalkInactive if the histwalk addon is not active, and histutil.ErrEndOfHistory if it would go over the end.

func Start Uses

func Start(app cli.App, cfg Config)

Start starts the histwalk addon.

type Config Uses

type Config struct {
    // Keybinding.
    Binding cli.Handler
    // The history walker.
    Walker histutil.Walker
}

Config keeps the configuration for the histwalk addon.

Package histwalk imports 5 packages (graph) and is imported by 1 packages. Updated 2020-02-22. Refresh now. Tools for package owners.