lastcmd

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(app cli.App, cfg Config)

Start starts lastcmd function.

Types

type Config

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

type Store interface {
	Cursor(prefix string) histutil.Cursor
}

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

Jump to

Keyboard shortcuts

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