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 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. SourceDirAbsPath chezmoi.AbsPath `mapstructure:"sourceDir"` DestDirAbsPath chezmoi.AbsPath `mapstructure:"destDir"` Umask fs.FileMode `mapstructure:"umask"` Remove bool `mapstructure:"remove"` Color *autoBool `mapstructure:"color"` Data map[string]interface{} `mapstructure:"data"` Template templateConfig `mapstructure:"template"` UseBuiltinGit *autoBool `mapstructure:"useBuiltinGit"` Pager string `mapstructure:"pager"` Interpreters map[string]*chezmoi.Interpreter `mapstructure:"interpreters"` // 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"` Diff diffCmdConfig `mapstructure:"diff"` Docs docsCmdConfig `mapstructure:"docs"` Edit editCmdConfig `mapstructure:"edit"` Git gitCmdConfig `mapstructure:"git"` Merge mergeCmdConfig `mapstructure:"merge"` // contains filtered or unexported fields }
A Config represents a configuration.
type ErrExitCode ¶
type ErrExitCode int
An ErrExitCode indicates the the main program should exit with the given code.
func (ErrExitCode) Error ¶
func (e ErrExitCode) Error() string
Source Files ¶
- addcmd.go
- applycmd.go
- archivecmd.go
- autobool.go
- bitwardentemplatefuncs.go
- catcmd.go
- cdcmd.go
- chattrcmd.go
- cmd.go
- completioncmd.go
- config.go
- datacmd.go
- dataformat.go
- diffcmd.go
- docscmd.go
- doctorcmd.go
- dumpcmd.go
- editcmd.go
- editconfigcmd.go
- executetemplatecmd.go
- forgetcmd.go
- gitcmd.go
- githubtemplatefuncs.go
- gopasstemplatefuncs.go
- helpcmd.go
- importcmd.go
- initcmd.go
- keepassxctemplatefuncs.go
- keyringtemplatefuncs.go
- lastpasstemplatefuncs.go
- managedcmd.go
- mergecmd.go
- onepasswordtemplatefuncs.go
- passtemplatefuncs.go
- purgecmd.go
- readdcmd.go
- removecmd.go
- secretcmd.go
- secretkeyringcmd.go
- secrettemplatefuncs.go
- sourcepathcmd.go
- statecmd.go
- statuscmd.go
- templatefuncs.go
- terminal.go
- unmanagedcmd.go
- updatecmd.go
- upgradecmd.go
- upgradecmd_unix.go
- util.go
- util_unix.go
- vaulttemplatefuncs.go
- verifycmd.go
Click to show internal directories.
Click to hide internal directories.