v0.30.2 Latest Latest

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 21 Imported by: 0



package git contains git related actions



This section is empty.


This section is empty.


func ActionAliases added in v0.15.1

func ActionAliases(gitDir string) carapace.Action

ActionAliases completes aliases

po (push origin)
ct (checkout --track)

func ActionAuthors added in v0.8.1

func ActionAuthors() carapace.Action

ActionAuthors completes authors

Some Name (
Another Name (

func ActionBundleHeads

func ActionBundleHeads(file string) carapace.Action

ActionBundleHeads completes refs in a bundle

func ActionCachedDiffs added in v0.29.1

func ActionCachedDiffs(ref string) carapace.Action

ActionCachedDiffs completes changes between stage and given ref

func ActionChanges

func ActionChanges(opts ChangeOpts) carapace.Action

ActionChanges completes (un)staged changes

fileA ( M)
pathA/fileB (??)

func ActionCleanupMode

func ActionCleanupMode() carapace.Action

ActionCleanupMode completes cleanup modes

strip (strip empty lines and trailing whitespace)
whitespace (same as strip except #commentary is not removed)

func ActionColorConfigs

func ActionColorConfigs() carapace.Action

ActionColorConfigs completes color configs

func ActionColorModes added in v0.22.0

func ActionColorModes() carapace.Action

ActionColorModes completes color modes


func ActionColorMovedModes added in v0.22.0

func ActionColorMovedModes() carapace.Action

ActionColorMovedModes completes color moved modes

no (Moved lines are not highlighted)
default (default mode)

func ActionColorMovedWsModes added in v0.22.0

func ActionColorMovedWsModes() carapace.Action

ActionColorMovedWsModes completed color moved whitespace modes

no (Do not ignore whitespace when performing move detection)
ignore-space-at-eol (Ignore changes in whitespace at EOL)

func ActionColors

func ActionColors() carapace.Action

ActionColors completes colors

func ActionColumnLayoutModes added in v0.28.3

func ActionColumnLayoutModes() carapace.Action

ActionColumnLayoutModes completions column layout modes

always (always show in columns)
auto (show in columns if the output is to the terminal)

func ActionCommitters added in v0.12.7

func ActionCommitters() carapace.Action

ActionCommitters completes committers


func ActionConfigTypeOptions

func ActionConfigTypeOptions(t string) carapace.Action

ActionConfigTypeOptions completes options for a config type

func ActionConfigTypes

func ActionConfigTypes() carapace.Action

ActionConfigTypes completes config types

func ActionConfigValues added in v0.26.0

func ActionConfigValues(config string) carapace.Action

ActionConfigValues completes config values

func ActionConfigs

func ActionConfigs() carapace.Action

ActionConfigs completes configs

func ActionCurrentBranch

func ActionCurrentBranch() carapace.Action

ActionCurrentBranch completes the current branch


func ActionDeveloperInterfaces added in v0.28.3

func ActionDeveloperInterfaces() carapace.Action

ActionDeveloperInterfaces completes developer interfaces

format-bundle (The bundle file format)
format-chunk (Chunk-based file formats)

func ActionDiffAlgorithms added in v0.22.0

func ActionDiffAlgorithms() carapace.Action

ActionDiffAlgorithms completes diff algorithms

myers (The basic greedy diff algorithm)
minimal (Spend extra time to make sure the smallest possible diff is produced)

func ActionDiffTools added in v0.27.0

func ActionDiffTools() carapace.Action

ActionDiffTools completes diff tools


func ActionDirstats added in v0.27.0

func ActionDirstats() carapace.Action

ActionDirstats completes dirstats

files (Compute the dirstat numbers by counting the number of files changed)
cumulative (Count changes in a child directory for the parent directory as well)

func ActionFieldNames

func ActionFieldNames() carapace.Action

ActionFieldNames completes field names

author (the author header-field)
body (the body of the message)

func ActionHeadCommits added in v0.22.0

func ActionHeadCommits(limit int) carapace.Action

ActionHeadCommits completes recent head commits

HEAD (commit message)
HEAD~1 (commit message)

func ActionLocalBranches added in v0.22.0

func ActionLocalBranches() carapace.Action

ActionLocalBranches completes local branches

master (last commit msg)
another (last commit msg)

func ActionLsRemoteRefs

func ActionLsRemoteRefs(opts LsRemoteRefOption) carapace.Action

ActionLsRemoteRefs completes branches and tags for a remote url

gh-pages (da4528d0a57ad71417336f0e96fa65ece2fad45a)
master (3fbdef3c6a10094812a15cba8e825898b757dfb3)

func ActionMaintenanceTasks added in v0.30.2

func ActionMaintenanceTasks() carapace.Action

ActionMaintenanceTasks completes maintenance tasks

commit-graph (Update the commit-graph files incrementally)
prefetch (Updates the object directory with the latest objects from all registered remotes)

func ActionMergeStrategy

func ActionMergeStrategy() carapace.Action

ActionMergeStrategy completes merge strategies

octopus (resolve cases with more than two heads)
ours (auto-resolve cleanly by favoring our version)

func ActionMergeStrategyOptions

func ActionMergeStrategyOptions(strategy string) carapace.Action

ActionMergeStrategyOptions completes merge strategy options

ours (auto-resolve favoring ours)
theirs (auto-resolve favoring theirs)

func ActionNotes added in v0.24.0

func ActionNotes() carapace.Action

ActionNotes completes notes

e37823c1 (d10deda4)
fc287455 (53797853)

func ActionNotesMergeStrategies added in v0.24.0

func ActionNotesMergeStrategies() carapace.Action

ActionNotesMergeStrategies completes notes merge strategies

ours (favor the local version)
theirs (favor the remote version)

func ActionRecentCommits added in v0.22.0

func ActionRecentCommits(limit int) carapace.Action

ActionRecentCommits completes recent commits

123456A ((refname) commit message)
123456B ((refname) commit message)

func ActionRefChanges added in v0.23.0

func ActionRefChanges(ref string) carapace.Action

ActionRefChanges completes changes made in given ref


func ActionRefCommits added in v0.27.0

func ActionRefCommits(ref string) carapace.Action

ActionRefCommits completes commits reachable by given ref

00 (commit message)
01 (commit message)

func ActionRefDiffs added in v0.28.0

func ActionRefDiffs(refs ...string) carapace.Action

ActionRefDiffs completes changes beetween refs Accepts up to two refs 0: compare current workspace to HEAD 1: compare current workspace to given ref 2: compare first ref to second ref

func ActionRefFiles

func ActionRefFiles(ref string) carapace.Action

ActionRefFiles completes files of given ref


func ActionRefParents added in v0.27.0

func ActionRefParents(ref string) carapace.Action

ActionRefParents completes parents of given ref

1 (7aca3ebc)
2 (4f4f9e93)

func ActionRefRanges added in v0.28.0

func ActionRefRanges(opts RefOption) carapace.Action

ActionRefRanges completes refs as range

HEAD..HEAD~17 (last commit msg)
v.0.0.3^2~03...v0.0.4~03 (last commit msg)

func ActionRefs

func ActionRefs(refOption RefOption) carapace.Action

ActionRefs completes refs (commits, branches, tags)

HEAD~1 (last commit msg)
v0.0.1 (last commit msg)

func ActionRemoteBranchNames added in v0.30.2

func ActionRemoteBranchNames(remote string) carapace.Action

ActionRemoteBranchNames is like ActionRemoteBranches but skips the remote prefix

master (last commit msg)
another (last commit msg)

func ActionRemoteBranches

func ActionRemoteBranches(remote string) carapace.Action

ActionRemoteBranches completes remote branches

origin/master (last commit msg)
upstream/another (last commit msg)

func ActionRemoteUrls

func ActionRemoteUrls(remote string) carapace.Action

ActionRemoteUrls completes remote urls

func ActionRemotes

func ActionRemotes() carapace.Action

ActionRemotes completes remote names


func ActionRepositorySearch added in v0.6.10

func ActionRepositorySearch(opts SearchOpts) carapace.Action

ActionRepositorySearch completes repositories from and

func ActionStashes

func ActionStashes() carapace.Action

ActionStashes completes stash names

stash@{0} (WIP on branchA: ABCDEF1 last commit msg)
stash@{1} (WIP on branchB: ABCDEF2 last commit msg)

func ActionSubmoduleBranches

func ActionSubmoduleBranches(filter ...string) carapace.Action

ActionSubmoduleBranches completes brances and tags of submodules (filtered by name) TODO verify and add example

func ActionSubmoduleNames

func ActionSubmoduleNames() carapace.Action

ActionSubmoduleNames completes submodule names

cobra (
pflag (

func ActionSubmodulePaths

func ActionSubmodulePaths() carapace.Action

ActionSubmodulePaths completes submodules (relative path)

../cli (v1.12.1-12-gaed8966f)
../pflag (heads/forOgier)

func ActionTags added in v0.22.0

func ActionTags() carapace.Action

ActionTags completes tags


func ActionTextAttributes

func ActionTextAttributes() carapace.Action

ActionTextAttributes completes text attributes

func ActionUnmergedFiles added in v0.22.0

func ActionUnmergedFiles() carapace.Action

ActionUnmergedFiles completes unmerged files


func ActionVariables added in v0.13.2

func ActionVariables() carapace.Action

ActionVariables completes variables

GIT_PAGER (bat --style grid)

func ActionWhitespaceModes added in v0.6.8

func ActionWhitespaceModes() carapace.Action

ActionWhitespaceModes completes whitespace modes

error (outputs warnings for a few such errors, and refuses to apply the patch)
error-all (is similar to error but shows all errors)

func ActionWhitespaceProblems added in v0.26.0

func ActionWhitespaceProblems() carapace.Action

ActionWhitespaceProblems completes whitespace problems

blank-at-eof (treats blank lines added at the end of file as an error)
trailing-space (is a short-hand to cover both blank-at-eol and blank-at-eof)

func ActionWordDiffModes added in v0.22.0

func ActionWordDiffModes() carapace.Action

ActionWordDiffModes completes word diff modes

no (Do not ignore whitespace when performing move detection)
ignore-space-at-eol (Ignore changes in whitespace at EOL)

func ActionWorktrees added in v0.12.7

func ActionWorktrees() carapace.Action

ActionWorktrees completes worktrees

/tmp/carapace-spec.git ((bare))
/tmp/carapace-spec.git/mexample (a3d9c48 [doc-usage])

func ActionWsErrorHighlightModes added in v0.22.0

func ActionWsErrorHighlightModes() carapace.Action

ActionWsErrorHighlightModes completes whitespace error highlight modes

context (context lines)
old (old lines)

func Aliases added in v0.15.1

func Aliases(dir, gitDir string) (map[string]string, error)


type ChangeOpts added in v0.12.5

type ChangeOpts struct {
	Ignored  bool
	Staged   bool
	Unstaged bool

func (ChangeOpts) Default added in v0.12.5

func (o ChangeOpts) Default() ChangeOpts

type LsRemoteRefOption

type LsRemoteRefOption struct {
	Url      string
	Branches bool
	Tags     bool

type RefOption

type RefOption struct {
	LocalBranches  bool
	RemoteBranches bool
	Commits        int
	HeadCommits    int
	Tags           bool
	Stashes        bool
	Notes          bool

func (RefOption) Default added in v0.12.2

func (o RefOption) Default() RefOption

type SearchOpts added in v0.18.0

type SearchOpts struct {
	Prefix bool
	Github bool
	Gitlab bool

func (SearchOpts) Default added in v0.18.0

func (o SearchOpts) Default() SearchOpts

func (SearchOpts) Hosts added in v0.18.0

func (o SearchOpts) Hosts() []string

Jump to

Keyboard shortcuts

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