jump

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxCompleteOptions = 9
)

Variables

This section is empty.

Functions

func BestGuess

func BestGuess(entries []*entry, args []string) string

func GetCandidates

func GetCandidates(entries []*entry, args []string, limit int) []string

Types

type EntryList

type EntryList []*entry

func (EntryList) Age

func (entries EntryList) Age()

As entries get older, their scores become lower.

func (EntryList) Sort

func (entries EntryList) Sort()

func (EntryList) Update

func (entries EntryList) Update(val string, weight float64) EntryList

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(dataPath string) Store

func (Store) AddPath

func (s Store) AddPath(pathToAdd string) error

func (Store) Cleanup

func (s Store) Cleanup() error

func (Store) GetNthCandidate

func (s Store) GetNthCandidate(args []string, index int, defaultPath string) (string, error)

func (Store) GetTopPath added in v0.8.0

func (s Store) GetTopPath(defaultPath string) (string, error)

func (Store) ReadEntries

func (s Store) ReadEntries() (EntryList, error)

Jump to

Keyboard shortcuts

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