source

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTagListOutput

func ParseTagListOutput(output string) []string

ParseTagListOutput parses the output of `jj tag list` into tag names.

Types

type AliasSource

type AliasSource struct {
	Aliases map[string]string
}

AliasSource converts revset aliases into completion items.

func (AliasSource) Fetch

func (s AliasSource) Fetch(_ Runner) ([]Item, error)

type BookmarkSource

type BookmarkSource struct{}

BookmarkSource loads all bookmarks (local + remote).

func (BookmarkSource) Fetch

func (s BookmarkSource) Fetch(runner Runner) ([]Item, error)

type FunctionDefinition

type FunctionDefinition struct {
	Name          string
	HasParameters bool
	SignatureHelp string
}

FunctionDefinition describes a built-in revset function.

func BaseFunctions

func BaseFunctions() []FunctionDefinition

BaseFunctions returns a copy of the built-in function definitions.

type FunctionSource

type FunctionSource struct{}

FunctionSource provides built-in revset functions as completion items.

func (FunctionSource) Fetch

func (s FunctionSource) Fetch(_ Runner) ([]Item, error)

type HistorySource

type HistorySource struct {
	Entries []string
}

HistorySource wraps a list of history entries as completion items.

func (HistorySource) Fetch

func (s HistorySource) Fetch(_ Runner) ([]Item, error)

type Item

type Item struct {
	Name          string
	Kind          Kind
	SignatureHelp string
	HasParameters bool
}

Item represents a completion/picker item from any source.

func FetchAll

func FetchAll(runner Runner, sources ...Source) []Item

FetchAll collects items from multiple sources, skipping failures.

type Kind

type Kind int
const (
	KindFunction Kind = iota
	KindAlias
	KindHistory
	KindBookmark
	KindTag
)

type Runner

type Runner = func([]string) ([]byte, error)

Runner executes a jj command and returns its output.

type Source

type Source interface {
	Fetch(runner Runner) ([]Item, error)
}

Source provides items for completion or selection.

type TagSource

type TagSource struct{}

TagSource loads all tags.

func (TagSource) Fetch

func (s TagSource) Fetch(runner Runner) ([]Item, error)

Jump to

Keyboard shortcuts

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