gitPrompt

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Format            string `json:"format"`
	IncludeZeroValues bool   `json:"includeZeroValues"`
	Separator         string `json:"separator"`
	PromptPrefix      string `json:"promptPrefix"`
	PromptSuffix      string `json:"promptSuffix"`
	Branch            struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"branch"`
	Ahead struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"ahead"`
	Behind struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"behind"`
	Untracked struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"untracked"`
	Modified struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"modified"`
	Deleted struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"deleted"`
	Unmerged struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"unmerged"`
	Staged struct {
		Prefix string `json:"prefix"`
		Suffix string `json:"suffix"`
	} `json:"staged"`
}

func NewConfig

func NewConfig() *Config

func (*Config) ConfigExists

func (config *Config) ConfigExists() bool

func (*Config) Load

func (config *Config) Load() error

Load : Loads the configuration file

type GitPrompt

type GitPrompt struct {
}

GitPrompt : Creates a short string showing status of a git repository

func (*GitPrompt) GetPrompt

func (g *GitPrompt) GetPrompt(args []string) string

GetPrompt : Creates a short string showing status of a git repository

Jump to

Keyboard shortcuts

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