completion

package
v0.0.0-...-7db4835 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete

func Complete(cfg config.Config, env Environment) alfred.FilterResult

Complete runs the main completion code

func ErrorItem

func ErrorItem(title, subtitle string) alfred.Item

ErrorItem returns an error message entry to display in alfred

Types

type Environment

type Environment struct {
	Query string
	Start time.Time
}

Environment represents the runtime environment from Alfred's invocation of this binary.

func LoadAlfredEnvironment

func LoadAlfredEnvironment(input string) Environment

LoadAlfredEnvironment extracts the runtime environment from the OS environment

The result of a script filter can set environment variables along with a "rerun this" timer for another invocation, and this retrieves and stores that information.

Exported publicly for use with debugging

func (Environment) Duration

func (e Environment) Duration() time.Duration

Duration since alfred saw the first query

Jump to

Keyboard shortcuts

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