cmd

package
v16.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 46 Imported by: 0

Documentation

Overview

Package cmd defines the Git Town commands.

Index

Constants

View Source
const (
	CompletionTypeBash       = CompletionType("bash")
	CompletionTypeZsh        = CompletionType("zsh")
	CompletionTypeFish       = CompletionType("fish")
	CompletionTypePowershell = CompletionType("powershell")
)

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute runs the Cobra stack.

func SwitchBranchCursorPos added in v16.2.0

func SwitchBranchCursorPos(entries []dialog.SwitchBranchEntry, initialBranch gitdomain.LocalBranchName) int

SwitchBranchCursorPos provides the initial cursor position for the "switch branch" components.

func SwitchBranchEntries added in v16.2.0

func SwitchBranchEntries(branchInfos gitdomain.BranchInfos, branchTypes []configdomain.BranchType, branchesAndTypes configdomain.BranchesAndTypes, lineage configdomain.Lineage, defaultBranchType configdomain.BranchType, allBranches configdomain.AllBranches, regexes []*regexp.Regexp) []dialog.SwitchBranchEntry

SwitchBranchEntries provides the entries for the "switch branch" components.

Types

type CompletionType

type CompletionType string

CompletionType defines the valid shells for which Git Town can create auto-completions. This is a type-safe enum, see https://npf.io/2022/05/safer-enums.

func NewCompletionType

func NewCompletionType(text string) (CompletionType, error)

func (CompletionType) String

func (self CompletionType) String() string

Directories

Path Synopsis
Package cmdhelpers provides utility functions for defining Cobra commands.
Package cmdhelpers provides utility functions for defining Cobra commands.
Package config implements Git Town's "config" command.
Package config implements Git Town's "config" command.
Package debug implements Git Town's hidden "debug" command.
Package debug implements Git Town's hidden "debug" command.
Package ship implements Git Town's "ship" command.
Package ship implements Git Town's "ship" command.
Package status implements Git Town's "status" subcommand.
Package status implements Git Town's "status" subcommand.
Package sync provides functionality around syncing Git branches.
Package sync provides functionality around syncing Git branches.

Jump to

Keyboard shortcuts

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