Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the entry point to this package. It returns a list of keybindings based on the config's user-defined custom commands. See https://github.com/BSteffaniak/lazyaws/blob/master/docs/Custom_Command_Keybindings.md for more info.
func NewClient ¶
func NewClient( c *types.HelperCommon, os *oscommands.OSCommand, git *commands.GitCommand, contexts *context.ContextTree, helpers *helpers.Helpers, ) *Client
type CustomCommandObject ¶
type CustomCommandObjects ¶
type CustomCommandObjects struct { *SessionState PromptResponses []string Form map[string]string }
type HandlerCreator ¶
type HandlerCreator struct {
// contains filtered or unexported fields
}
takes a custom command and returns a function that will be called when the corresponding user-defined keybinding is pressed
func NewHandlerCreator ¶
func NewHandlerCreator( c *types.HelperCommon, os *oscommands.OSCommand, git *commands.GitCommand, sessionStateLoader *SessionStateLoader, ) *HandlerCreator
type KeybindingCreator ¶
type KeybindingCreator struct {
// contains filtered or unexported fields
}
KeybindingCreator takes a custom command along with its handler and returns a corresponding keybinding
func NewKeybindingCreator ¶
func NewKeybindingCreator(contexts *context.ContextTree) *KeybindingCreator
type MenuGenerator ¶
type MenuGenerator struct {
// contains filtered or unexported fields
}
func NewMenuGenerator ¶
func NewMenuGenerator(c *common.Common) *MenuGenerator
takes the output of a command and returns a list of menu entries based on a filter and value/label format templates provided by the user
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
takes a prompt that is defined in terms of template strings and resolves the templates to contain actual values
func NewResolver ¶
type SessionState ¶
type SessionState struct { SelectedLocalCommit *models.Commit SelectedReflogCommit *models.Commit SelectedSubCommit *models.Commit SelectedFile *models.File SelectedPath string SelectedLocalBranch *models.Branch SelectedRemoteBranch *models.RemoteBranch SelectedRemote *models.Remote SelectedTag *models.Tag SelectedStashEntry *models.StashEntry SelectedCommitFile *models.CommitFile SelectedCommitFilePath string CheckedOutBranch *models.Branch }
SessionState captures the current state of the application for use in custom commands
type SessionStateLoader ¶
type SessionStateLoader struct {
// contains filtered or unexported fields
}
loads the session state at the time that a custom command is invoked, for use in the custom command's template strings
func NewSessionStateLoader ¶
func NewSessionStateLoader(contexts *context.ContextTree, helpers *helpers.Helpers) *SessionStateLoader
type TrimmerTemplate ¶
type TrimmerTemplate struct {
// contains filtered or unexported fields
}
wrapper around a template which trims the output
func NewTrimmerTemplate ¶
func NewTrimmerTemplate(template *template.Template) *TrimmerTemplate