util

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandToShellHistory added in v0.3.7

func AddCommandToShellHistory(cmd string, args []string)

func AllGitSubCommands added in v0.3.3

func AllGitSubCommands() (cc []*cobra.Command)

func BranchListSuggestions added in v0.3.3

func BranchListSuggestions() []prompt.Suggest

func CloudBranchExists

func CloudBranchExists() bool

func CobraCommandToSuggestions added in v0.3.3

func CobraCommandToSuggestions(cmds []*cobra.Command) []prompt.Suggest

func CurrentBranch

func CurrentBranch() string

func FlagSuggestions added in v0.3.3

func FlagSuggestions(gitSubCmd string, flagtype string) []prompt.Suggest

func GitAddSuggestions added in v0.3.3

func GitAddSuggestions() []prompt.Suggest

func IsAheadOfCurrent

func IsAheadOfCurrent() bool

func IsBehindCurrent

func IsBehindCurrent() bool

func IsDiverged

func IsDiverged() bool

func IsYes

func IsYes(resp string) bool

func NothingToCommit

func NothingToCommit() bool

func PromptUser

func PromptUser(prompt string) string

fixme when writing input the user cant backspace in the normal fashion

func RunScriptWithString added in v0.3.7

func RunScriptWithString(path string, script string, args ...string)

func Runwithcolor

func Runwithcolor(args []string) error

func StashList added in v0.2.2

func StashList() []string

func StashableChanges added in v0.2.2

func StashableChanges() bool

func SuggestionPrompt added in v0.3.3

func SuggestionPrompt(prefix string, completer func(d prompt.Document) []prompt.Suggest) string

Types

type Branch added in v0.3.2

type Branch struct {
	Author       string
	Name         string
	RelativeDate string
}

func BranchList added in v0.2.3

func BranchList() []Branch

type FileChange added in v0.3.3

type FileChange struct {
	Name   string
	Status string
}

func FileChangesList added in v0.3.3

func FileChangesList() []FileChange

Jump to

Keyboard shortcuts

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