Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &bonzai.Cmd{ Name: `var`, Alias: `vars`, Vers: `v0.1.0`, Cmds: []*bonzai.Cmd{ GetCmd, SetCmd, editCmd, initCmd, clearCmd, grepCmd, loadCmd, deleteCmd, dataCmd, }, Comp: comp.Cmds, Def: GetCmd, }
View Source
var GetCmd = &bonzai.Cmd{ Name: `get`, Comp: comp.Vars, NumArgs: 1, Call: func(_ *bonzai.Cmd, args ...string) error { value, err := vars.Data.Get(args[0]) if err != nil { return err } term.Print(value) return nil }, }
can be imported directly into other Cmds without problem
View Source
var SetCmd = &bonzai.Cmd{ Name: `set`, Comp: comp.Vars, MinArgs: 2, Call: func(_ *bonzai.Cmd, args ...string) error { return vars.Data.Set(args[0], strings.Join(args[1:], " ")) }, }
can be imported directly into other Cmds without problem
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.