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

package completion

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

Package completion implements the UI for showing, filtering and inserting completion candidates.


Package Files


func Close Uses

func Close(app cli.App)

Close closes the completion UI.

func Start Uses

func Start(app cli.App, cfg Config)

Start starts the completion UI.

type Config Uses

type Config struct {
    Binding cli.Handler
    Name    string
    Replace diag.Ranging
    Items   []Item

Config keeps the configuration for the completion UI.

type Item Uses

type Item struct {
    // Used in the UI and for filtering.
    ToShow string
    // Style to use in the UI.
    ShowStyle ui.Style
    // Used when inserting a candidate.
    ToInsert string

Item represents a completion item, also known as a candidate.

Package completion imports 4 packages (graph) and is imported by 2 packages. Updated 2020-02-22. Refresh now. Tools for package owners.