Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var XEnvCmd = &gcli.Command{ Name: "xenv", Desc: "Manage local development environments and tools, similar to mise and vfox", Help: ` Quick commands: <info>set</> Quick exec the 'env set' subcommand <info>unset</> Quick exec the 'env unset' subcommand `, Subs: []*gcli.Command{ subcmd.ToolsCmd, subcmd.NewUseCmd(), subcmd.NewUnuseCmd(), subcmd.EnvCmd, subcmd.PathCmd, subcmd.ConfigCmd, subcmd.ListCmd, subcmd.InitCmd, subcmd.NewShellCmd(), subcmd.ShellHookInitCmd(), subcmd.ShellDirenvCmd(), }, Config: func(c *gcli.Command) { c.BoolOpt(&subcmd.GlobalFlag, "global", "g", false, "Operate for global config") c.BoolOpt(&xenvcom.DebugMode, "debug", "d", xenvcom.DebugMode, "Enable debug mode. can be XENV_DEBUG_MODE=true") c.On(events.OnCmdNotFound, func(ctx *gcli.HookCtx) (stop bool) { name := ctx.Str("name") if name == "set" || name == "unset" { newArgs := []string{"env", name} newArgs = append(newArgs, ctx.Strings("args")...) err := app.Cli.RunCmd("xenv", newArgs) if err != nil { fmt.Println(err) } return true } return false }) }, }
XEnvCmd the main xenv command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.