cmd

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 65 Imported by: 0

Documentation

Overview

Package cmd contains chezmoi's commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(versionInfo VersionInfo, args []string) int

Main runs chezmoi and returns an exit code.

func ParseGoVersion added in v2.9.4

func ParseGoVersion(goVersion string) (*semver.Version, error)

func StringOrBoolToAutoBoolHookFunc

func StringOrBoolToAutoBoolHookFunc() mapstructure.DecodeHookFunc

StringOrBoolToAutoBoolHookFunc is a github.com/mitchellh/mapstructure.DecodeHookFunc that parses an autoBool from a bool or string.

Types

type Config

type Config struct {
	// Global configuration, settable in the config file.
	CacheDirAbsPath    chezmoi.AbsPath                 `mapstructure:"cacheDir"`
	Color              autoBool                        `mapstructure:"color"`
	Data               map[string]interface{}          `mapstructure:"data"`
	DestDirAbsPath     chezmoi.AbsPath                 `mapstructure:"destDir"`
	Interpreters       map[string]*chezmoi.Interpreter `mapstructure:"interpreters"`
	Mode               chezmoi.Mode                    `mapstructure:"mode"`
	Pager              string                          `mapstructure:"pager"`
	PINEntry           pinEntryConfig                  `mapstructure:"pinentry"`
	Safe               bool                            `mapstructure:"safe"`
	SourceDirAbsPath   chezmoi.AbsPath                 `mapstructure:"sourceDir"`
	Template           templateConfig                  `mapstructure:"template"`
	Umask              fs.FileMode                     `mapstructure:"umask"`
	UseBuiltinAge      autoBool                        `mapstructure:"useBuiltinAge"`
	UseBuiltinGit      autoBool                        `mapstructure:"useBuiltinGit"`
	Verbose            bool                            `mapstructure:"verbose"`
	WorkingTreeAbsPath chezmoi.AbsPath                 `mapstructure:"workingTree"`

	// Password manager configurations, settable in the config file.
	Bitwarden   bitwardenConfig   `mapstructure:"bitwarden"`
	Gopass      gopassConfig      `mapstructure:"gopass"`
	Keepassxc   keepassxcConfig   `mapstructure:"keepassxc"`
	Lastpass    lastpassConfig    `mapstructure:"lastpass"`
	Onepassword onepasswordConfig `mapstructure:"onepassword"`
	Pass        passConfig        `mapstructure:"pass"`
	Secret      secretConfig      `mapstructure:"secret"`
	Vault       vaultConfig       `mapstructure:"vault"`

	// Encryption configurations, settable in the config file.
	Encryption string                `mapstructure:"encryption"`
	Age        chezmoi.AgeEncryption `mapstructure:"age"`
	GPG        chezmoi.GPGEncryption `mapstructure:"gpg"`

	// Command configurations, settable in the config file.
	Add        addCmdConfig        `mapstructure:"add"`
	CD         cdCmdConfig         `mapstructure:"cd"`
	Completion completionCmdConfig `mapstructure:"completion"`
	Diff       diffCmdConfig       `mapstructure:"diff"`
	Edit       editCmdConfig       `mapstructure:"edit"`
	Git        gitCmdConfig        `mapstructure:"git"`
	Merge      mergeCmdConfig      `mapstructure:"merge"`
	// contains filtered or unexported fields
}

A Config represents a configuration.

type VersionInfo

type VersionInfo struct {
	Version string
	Commit  string
	Date    string
	BuiltBy string
}

A VersionInfo contains a version.

func (VersionInfo) MarshalZerologObject added in v2.3.0

func (v VersionInfo) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements github.com/rs/zerolog.LogObjectMarshaler.MarshalZerologObject.

Jump to

Keyboard shortcuts

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