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

package lastcmd

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

Package lastcmd implements an addon that supports inserting the last command or words from it.

Index

Package Files

lastcmd.go

func Start Uses

func Start(app cli.App, cfg Config)

Start starts lastcmd function.

type Config Uses

type Config struct {
    // Binding provides key binding.
    Binding cli.Handler
    // Store provides the source for the last command.
    Store Store
    // Wordifier breaks a command into words.
    Wordifier func(string) []string
}

Config is the configuration for starting lastcmd.

type Store Uses

type Store interface {
    LastCmd() (store.Cmd, error)
}

Store wraps the LastCmd method. It is a subset of histutil.Store.

Package lastcmd imports 7 packages (graph) and is imported by 1 packages. Updated 2020-02-15. Refresh now. Tools for package owners.