Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteFunc ¶
A CompleteFunc accepts a string to be completed and returns a slice of completions candidates with a prefix to prepend to the chosen candidate
type Completer ¶
type Completer struct { // AddressBookCmd is the command to run for completing email addresses. This // command must output one completion on each line with fields separated by a // tab character. The first field must be the address, and the second field, // if present, the contact name. Only the email address field is required. // The name field is optional. Additional fields are ignored. AddressBookCmd string // contains filtered or unexported fields }
A Completer is used to autocomplete text inputs based on the configured completion commands.
func (*Completer) ForHeader ¶
func (c *Completer) ForHeader(h string) CompleteFunc
ForHeader returns a CompleteFunc appropriate for the specified mail header. In the case of To, From, etc., the completer will get completions from the configured address book command. For other headers, a noop completer will be returned. If errors arise during completion, the errHandler will be called.
Click to show internal directories.
Click to hide internal directories.