Documentation
¶
Overview ¶
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Package cmd provides command implementations for the ggc CLI tool.
Index ¶
- Variables
- func InteractiveUI(gitClient git.Clienter) []string
- func SetVersionGetter(getter VersionGetter)
- type ANSIColors
- type Adder
- type Brancher
- type Cleaner
- type Cmd
- func (c *Cmd) Add(args []string)
- func (c *Cmd) Branch(args []string)
- func (c *Cmd) Clean(args []string)
- func (c *Cmd) Commit(args []string)
- func (c *Cmd) Config(args []string)
- func (c *Cmd) Diff(args []string)
- func (c *Cmd) Fetch(args []string)
- func (c *Cmd) Help()
- func (c *Cmd) Hook(args []string)
- func (c *Cmd) Interactive()
- func (c *Cmd) Log(args []string)
- func (c *Cmd) Pull(args []string)
- func (c *Cmd) Push(args []string)
- func (c *Cmd) Rebase(args []string)
- func (c *Cmd) Remote(args []string)
- func (c *Cmd) Reset(args []string)
- func (c *Cmd) Restore(args []string)
- func (c *Cmd) Route(args []string)
- func (c *Cmd) Stash(args []string)
- func (c *Cmd) Status(args []string)
- func (c *Cmd) Tag(args []string)
- func (c *Cmd) Version(args []string)
- type CommandInfo
- type Committer
- type Completer
- type Configurer
- type Differ
- type Executer
- type Fetcher
- type GitStatus
- type Helper
- func (h *Helper) ShowAddHelp()
- func (h *Helper) ShowBranchHelp()
- func (h *Helper) ShowCleanHelp()
- func (h *Helper) ShowCommandHelp(data templates.HelpData)
- func (h *Helper) ShowCommitHelp()
- func (h *Helper) ShowConfigHelp()
- func (h *Helper) ShowDeleteBranchHelp()
- func (h *Helper) ShowDeleteMergedBranchHelp()
- func (h *Helper) ShowDiffHelp()
- func (h *Helper) ShowFetchHelp()
- func (h *Helper) ShowHelp()
- func (h *Helper) ShowHookHelp()
- func (h *Helper) ShowListBranchesHelp()
- func (h *Helper) ShowLogHelp()
- func (h *Helper) ShowPullHelp()
- func (h *Helper) ShowPushHelp()
- func (h *Helper) ShowRebaseHelp()
- func (h *Helper) ShowRemoteHelp()
- func (h *Helper) ShowResetHelp()
- func (h *Helper) ShowRestoreHelp()
- func (h *Helper) ShowStashHelp()
- func (h *Helper) ShowStatusHelp()
- func (h *Helper) ShowTagHelp()
- func (h *Helper) ShowVersionHelp()
- type Hooker
- type KeyHandler
- type Logger
- type Puller
- type Pusher
- type Rebaser
- type Remoter
- type Renderer
- type Resetter
- type Restorer
- type Stasher
- type Statuser
- type Tagger
- type UI
- type UIState
- func (s *UIState) AddRune(r rune)
- func (s *UIState) ClearInput()
- func (s *UIState) DeleteToEnd()
- func (s *UIState) DeleteWord()
- func (s *UIState) GetSelectedCommand() *CommandInfo
- func (s *UIState) HasInput() bool
- func (s *UIState) HasMatches() bool
- func (s *UIState) MoveDown()
- func (s *UIState) MoveLeft()
- func (s *UIState) MoveRight()
- func (s *UIState) MoveToBeginning()
- func (s *UIState) MoveToEnd()
- func (s *UIState) MoveUp()
- func (s *UIState) MoveWordLeft()
- func (s *UIState) MoveWordRight()
- func (s *UIState) RemoveChar()
- func (s *UIState) UpdateFiltered()
- type VersionGetter
- type Versioner
Constants ¶
This section is empty.
Variables ¶
var NewCompleter = func(client git.Clienter) *Completer { return &Completer{ gitClient: client, } }
NewCompleter creates a new Completer.
Functions ¶
func InteractiveUI ¶
InteractiveUI provides an incremental search interactive UI with custom git client. Returns the selected command as []string (nil if nothing selected)
func SetVersionGetter ¶
func SetVersionGetter(getter VersionGetter)
SetVersionGetter sets the version getter function
Types ¶
type ANSIColors ¶
type ANSIColors struct {
// Basic colors (0-7)
Black string
Red string
Green string
Yellow string
Blue string
Magenta string
Cyan string
White string
// Bright colors (8-15)
BrightBlack string // Gray
BrightRed string
BrightGreen string
BrightYellow string
BrightBlue string
BrightMagenta string
BrightCyan string
BrightWhite string
// Text attributes
Bold string
Underline string
Reverse string
Reset string
}
ANSIColors defines color codes for terminal output
func NewANSIColors ¶
func NewANSIColors() *ANSIColors
NewANSIColors creates a new ANSIColors instance
type Adder ¶
type Adder struct {
// contains filtered or unexported fields
}
Adder provides functionality for the add command.
type Brancher ¶
type Brancher struct {
// contains filtered or unexported fields
}
Brancher provides functionality for the branch command.
func NewBrancher ¶
NewBrancher creates a new Brancher.
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
Cleaner provides functionality for the clean command.
func (*Cleaner) CleanInteractive ¶
func (c *Cleaner) CleanInteractive()
CleanInteractive interactively selects files to clean.
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
Cmd represents the command-line interface.
type CommandInfo ¶
CommandInfo contains the name and description of the command
type Committer ¶
type Committer struct {
// contains filtered or unexported fields
}
Committer provides functionality for the commit command.
func NewCommitter ¶
NewCommitter creates a new Committer.
type Completer ¶
type Completer struct {
// contains filtered or unexported fields
}
Completer handles dynamic completion for subcommands/args
type Configurer ¶ added in v5.0.3
type Configurer struct {
// contains filtered or unexported fields
}
Configurer handles config operations.
func NewConfigurer ¶ added in v5.0.3
func NewConfigurer(client git.Clienter) *Configurer
NewConfigurer creates a new Configurer instance.
func (*Configurer) Config ¶ added in v5.0.3
func (c *Configurer) Config(args []string)
Config executes config command operations with the given arguments.
func (*Configurer) LoadConfig ¶ added in v5.0.3
func (c *Configurer) LoadConfig() *config.Manager
LoadConfig executes loads the configuration.
type Differ ¶
type Differ struct {
// contains filtered or unexported fields
}
Differ handles git diff operations.
type Executer ¶
type Executer interface {
Help()
Branch(args []string)
Commit(args []string)
Log(args []string)
Pull(args []string)
Push(args []string)
Reset(args []string)
Diff(args []string)
Config(args []string)
Hook(args []string)
Rebase(args []string)
Remote(args []string)
Version(args []string)
Stash(args []string)
Fetch(args []string)
Status(args []string)
Tag(args []string)
Clean(args []string)
Restore(args []string)
Add(args []string)
Interactive()
}
Executer is an interface for executing commands.
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher handles git fetch operations.
func NewFetcher ¶
NewFetcher creates a new Fetcher instance.
type GitStatus ¶
type GitStatus struct {
Branch string
Modified int
Staged int
Ahead int
Behind int
HasChanges bool
}
GitStatus represents the current Git repository status
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper provides help message functionality.
func (*Helper) ShowAddHelp ¶
func (h *Helper) ShowAddHelp()
ShowAddHelp shows help message for add command.
func (*Helper) ShowBranchHelp ¶
func (h *Helper) ShowBranchHelp()
ShowBranchHelp shows help message for branch command.
func (*Helper) ShowCleanHelp ¶
func (h *Helper) ShowCleanHelp()
ShowCleanHelp shows help message for clean command.
func (*Helper) ShowCommandHelp ¶
ShowCommandHelp shows help message for a command.
func (*Helper) ShowCommitHelp ¶
func (h *Helper) ShowCommitHelp()
ShowCommitHelp shows help message for commit command.
func (*Helper) ShowConfigHelp ¶
func (h *Helper) ShowConfigHelp()
ShowConfigHelp shows help message for config command.
func (*Helper) ShowDeleteBranchHelp ¶
func (h *Helper) ShowDeleteBranchHelp()
ShowDeleteBranchHelp displays help for the delete branch command.
func (*Helper) ShowDeleteMergedBranchHelp ¶
func (h *Helper) ShowDeleteMergedBranchHelp()
ShowDeleteMergedBranchHelp displays help for the delete merged branch command.
func (*Helper) ShowDiffHelp ¶
func (h *Helper) ShowDiffHelp()
ShowDiffHelp displays help for the git diff command.
func (*Helper) ShowFetchHelp ¶
func (h *Helper) ShowFetchHelp()
ShowFetchHelp shows help message for fetch command.
func (*Helper) ShowHookHelp ¶
func (h *Helper) ShowHookHelp()
ShowHookHelp displays help information for hook commands.
func (*Helper) ShowListBranchesHelp ¶
func (h *Helper) ShowListBranchesHelp()
ShowListBranchesHelp displays help for the list branches command.
func (*Helper) ShowLogHelp ¶
func (h *Helper) ShowLogHelp()
ShowLogHelp shows help message for log command.
func (*Helper) ShowPullHelp ¶
func (h *Helper) ShowPullHelp()
ShowPullHelp shows help message for pull command.
func (*Helper) ShowPushHelp ¶
func (h *Helper) ShowPushHelp()
ShowPushHelp shows help message for push command.
func (*Helper) ShowRebaseHelp ¶
func (h *Helper) ShowRebaseHelp()
ShowRebaseHelp shows help message for rebase command.
func (*Helper) ShowRemoteHelp ¶
func (h *Helper) ShowRemoteHelp()
ShowRemoteHelp shows help message for remote command.
func (*Helper) ShowResetHelp ¶
func (h *Helper) ShowResetHelp()
ShowResetHelp shows help message for reset command.
func (*Helper) ShowRestoreHelp ¶
func (h *Helper) ShowRestoreHelp()
ShowRestoreHelp shows help message for restore command.
func (*Helper) ShowStashHelp ¶
func (h *Helper) ShowStashHelp()
ShowStashHelp shows help message for stash command.
func (*Helper) ShowStatusHelp ¶
func (h *Helper) ShowStatusHelp()
ShowStatusHelp shows help message for status command.
func (*Helper) ShowTagHelp ¶
func (h *Helper) ShowTagHelp()
ShowTagHelp shows help message for tag command.
func (*Helper) ShowVersionHelp ¶
func (h *Helper) ShowVersionHelp()
ShowVersionHelp shows help message for Version command.
type Hooker ¶
type Hooker struct {
// contains filtered or unexported fields
}
Hooker handles git hook operations.
type KeyHandler ¶
type KeyHandler struct {
// contains filtered or unexported fields
}
KeyHandler manages keyboard input processing
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides functionality for the log command.
type Puller ¶
type Puller struct {
// contains filtered or unexported fields
}
Puller provides functionality for the pull command.
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
Pusher provides functionality for the push command.
type Rebaser ¶
type Rebaser struct {
// contains filtered or unexported fields
}
Rebaser handles rebase operations.
func NewRebaser ¶
NewRebaser creates a new Rebaser instance.
func (*Rebaser) RebaseInteractive ¶
func (r *Rebaser) RebaseInteractive()
RebaseInteractive executes interactive rebase.
type Remoter ¶ added in v5.0.3
type Remoter struct {
// contains filtered or unexported fields
}
Remoter provides functionality for the remote command.
func NewRemoter ¶ added in v5.0.3
NewRemoter creates a new Remoter.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer handles all terminal rendering operations
type Resetter ¶
type Resetter struct {
// contains filtered or unexported fields
}
Resetter handles reset operations.
func NewResetter ¶
NewResetter creates a new Resetter instance.
type Restorer ¶ added in v5.0.3
type Restorer struct {
// contains filtered or unexported fields
}
Restorer handles restore operations.
func NewRestorer ¶ added in v5.0.3
NewRestorer creates a new Restorer instance.
type Stasher ¶
type Stasher struct {
// contains filtered or unexported fields
}
Stasher handles stash operations.
func NewStasher ¶
NewStasher creates a new Stasher instance.
type Statuser ¶ added in v5.0.3
type Statuser struct {
// contains filtered or unexported fields
}
Statuser handles status operations.
func NewStatuser ¶ added in v5.0.3
NewStatuser creates a new Statuser instance.
type Tagger ¶
type Tagger struct {
// contains filtered or unexported fields
}
Tagger handles tagging operations.
func (*Tagger) CreateAnnotatedTag ¶
CreateAnnotatedTag creates an annotated tag
func (*Tagger) GetLatestTag ¶
GetLatestTag gets the latest tag.
func (*Tagger) GetTagCommit ¶
GetTagCommit gets the commit hash for a tag.
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
UI represents the interface for terminal UI operations
type UIState ¶
type UIState struct {
// contains filtered or unexported fields
}
UIState holds the current state of the interactive UI
func (*UIState) DeleteToEnd ¶
func (s *UIState) DeleteToEnd()
DeleteToEnd deletes from cursor to end of line (Ctrl+K)
func (*UIState) DeleteWord ¶
func (s *UIState) DeleteWord()
DeleteWord deletes word before cursor (Ctrl+W)
func (*UIState) GetSelectedCommand ¶
func (s *UIState) GetSelectedCommand() *CommandInfo
GetSelectedCommand returns the currently selected command
func (*UIState) HasMatches ¶
HasMatches returns true if there are filtered matches
func (*UIState) MoveLeft ¶ added in v5.0.3
func (s *UIState) MoveLeft()
MoveLeft moves cursor one rune left
func (*UIState) MoveRight ¶ added in v5.0.3
func (s *UIState) MoveRight()
MoveRight moves cursor one rune right
func (*UIState) MoveToBeginning ¶
func (s *UIState) MoveToBeginning()
MoveToBeginning moves cursor to beginning of line (Ctrl+A)
func (*UIState) MoveToEnd ¶
func (s *UIState) MoveToEnd()
MoveToEnd moves cursor to end of line (Ctrl+E)
func (*UIState) MoveWordLeft ¶ added in v5.0.3
func (s *UIState) MoveWordLeft()
MoveWordLeft moves cursor to the beginning of the previous word
func (*UIState) MoveWordRight ¶ added in v5.0.3
func (s *UIState) MoveWordRight()
MoveWordRight moves cursor to the start of the next word
func (*UIState) RemoveChar ¶
func (s *UIState) RemoveChar()
RemoveChar removes character before cursor (backspace)
func (*UIState) UpdateFiltered ¶
func (s *UIState) UpdateFiltered()
UpdateFiltered updates the filtered commands based on current input using fuzzy matching
type VersionGetter ¶
type VersionGetter func() (version, commit string)
VersionGetter is a function type for getting version info
type Versioner ¶ added in v5.0.3
type Versioner struct {
// contains filtered or unexported fields
}
Versioner handles version operations.
func NewVersioner ¶ added in v5.0.3
NewVersioner creates a new Versioner instance.