Versions in this module Expand all Collapse all v2 v2.34.0 Mar 1, 2024 Changes in this version type Config + HideEnvDiff bool type Shell + var Murex Shell = murex{} + var Systemd Shell = systemdShell{} v2.33.0 Nov 29, 2023 Changes in this version + var CmdWatchPrint = &Cmd + func PowerShellEscape(str string) string + type AllowStatus int + const Allowed + const Denied + const NotAllowed type Config + func (config *Config) DenyDir() string type Shell + var Pwsh Shell = pwsh{} v2.32.3 May 20, 2023 v2.32.2 Nov 24, 2022 v2.32.1 Jun 21, 2022 v2.32.0 Jun 13, 2022 Changes in this version type Shell + var GitHubActions Shell = gha{} v2.31.0 Mar 26, 2022 Changes in this version type Config + LoadDotenv bool v2.30.3 Jan 5, 2022 Changes in this version type Config + SkipDotenv bool v2.30.2 Dec 28, 2021 Changes in this version + const ACK + const AMPERSTAND + const BACKSLASH + const BACKTICK + const CLOSE_BRACKET + const CR + const DEL + const DIRENV_BASH + const DIRENV_CONFIG + const DIRENV_DEBUG + const DIRENV_DIFF + const DIRENV_DIR + const DIRENV_DUMP_FILE_PATH + const DIRENV_FILE + const DIRENV_WATCHES + const LF + const LOWERCASE_Z + const NINE + const OPEN_BRACKET + const PLUS + const QUESTION + const SINGLE_QUOTE + const SPACE + const TAB + const TILDA + const UNDERSCORE + const UPPERCASE_Z + const US + var CmdAllow = &Cmd + var CmdApplyDump = &Cmd + var CmdCurrent = &Cmd + var CmdDeny = &Cmd + var CmdDotEnv = &Cmd + var CmdDump = &Cmd + var CmdEdit = &Cmd + var CmdExec = &Cmd + var CmdExport = &Cmd + var CmdFetchURL = &Cmd + var CmdHelp = &Cmd + var CmdHook = &Cmd + var CmdList []*Cmd + var CmdPrune = &Cmd + var CmdReload = &Cmd + var CmdShowDump = &Cmd + var CmdStatus = &Cmd + var CmdStdlib = &Cmd + var CmdVersion = &Cmd + var CmdWatch = &Cmd + var CmdWatchDir = &Cmd + var CmdWatchList = &Cmd + var Editors = [][]string + var IgnoredKeys = map[string]bool + func BashEscape(str string) string + func CommandsDispatch(env Env, args []string) error + func IgnoredEnv(key string) bool + func Main(env Env, args []string, modBashPath string, modStdlib string, ...) error + type Cmd struct + Action action + Aliases []string + Args []string + Desc string + Name string + Private bool + type Config struct + BashPath string + CacheDir string + ConfDir string + DataDir string + DisableStdin bool + Env Env + RCFile string + SelfPath string + StrictEnv bool + TomlPath string + WarnTimeout time.Duration + WhitelistExact map[string]bool + WhitelistPrefix []string + WorkDir string + func LoadConfig(env Env) (config *Config, err error) + func (config *Config) AllowDir() string + func (config *Config) EnvFromRC(path string, previousEnv Env) (Env, error) + func (config *Config) FindRC() (*RC, error) + func (config *Config) LoadedRC() *RC + func (config *Config) Revert(env Env) (Env, error) + type Env map[string]string + func GetEnv() Env + func LoadEnv(gzenvStr string) (env Env, err error) + func LoadEnvJSON(jsonBytes []byte) (env Env, err error) + func (env Env) CleanContext() + func (env Env) Copy() Env + func (env Env) Diff(other Env) *EnvDiff + func (env Env) Fetch(key, def string) string + func (env Env) Serialize() string + func (env Env) ToGoEnv() []string + func (env Env) ToShell(shell Shell) string + type EnvDiff struct + Next map[string]string + Prev map[string]string + func BuildEnvDiff(e1, e2 Env) *EnvDiff + func LoadEnvDiff(gzenvStr string) (diff *EnvDiff, err error) + func NewEnvDiff() *EnvDiff + func (diff *EnvDiff) Any() bool + func (diff *EnvDiff) Patch(env Env) (newEnv Env) + func (diff *EnvDiff) Reverse() *EnvDiff + func (diff *EnvDiff) Serialize() string + func (diff *EnvDiff) ToShell(shell Shell) string + type FileTime struct + Exists bool + Modtime int64 + Path string + func (times *FileTime) Formatted(relDir string) string + func (times FileTime) Check() (err error) + type FileTimes struct + func NewFileTimes() (times FileTimes) + func (times *FileTimes) Check() (err error) + func (times *FileTimes) CheckOne(path string) (err error) + func (times *FileTimes) Marshal() string + func (times *FileTimes) NewTime(path string, modtime int64, exists bool) (err error) + func (times *FileTimes) Unmarshal(from string) error + func (times *FileTimes) Update(path string) (err error) + type HookContext struct + SelfPath string + type RC struct + func FindRC(wd string, config *Config) (*RC, error) + func RCFromEnv(path, marshalledTimes string, config *Config) *RC + func RCFromPath(path string, config *Config) (*RC, error) + func (rc *RC) Allow() (err error) + func (rc *RC) Allowed() bool + func (rc *RC) Deny() error + func (rc *RC) Load(previousEnv Env) (newEnv Env, err error) + func (rc *RC) Path() string + func (rc *RC) Touch() error + type Shell interface + Dump func(env Env) string + Export func(e ShellExport) string + Hook func() (string, error) + var Bash Shell = bash{} + var Elvish Shell = elvish{} + var Fish Shell = fish{} + var GzEnv Shell = gzenvShell(0) + var JSON Shell = jsonShell{} + var Tcsh Shell = tcsh{} + var Vim Shell = vim{} + var Zsh Shell = zsh{} + func DetectShell(target string) Shell + type ShellExport map[string]*string + func (e ShellExport) Add(key, value string) + func (e ShellExport) Remove(key string)