MCPcopy Create free account
hub / github.com/cogentcore/core / InstallBuiltins

Method InstallBuiltins

shell/builtins.go:23–37  ·  view source on GitHub ↗

InstallBuiltins adds the builtin shell commands to [Shell.Builtins].

()

Source from the content-addressed store, hash-verified

21
22// InstallBuiltins adds the builtin shell commands to [Shell.Builtins].
23func (sh *Shell) InstallBuiltins() {
24 sh.Builtins = make(map[string]func(cmdIO *exec.CmdIO, args ...string) error)
25 sh.Builtins["cd"] = sh.Cd
26 sh.Builtins["exit"] = sh.Exit
27 sh.Builtins["jobs"] = sh.JobsCmd
28 sh.Builtins["kill"] = sh.Kill
29 sh.Builtins["set"] = sh.Set
30 sh.Builtins["add-path"] = sh.AddPath
31 sh.Builtins["which"] = sh.Which
32 sh.Builtins["source"] = sh.Source
33 sh.Builtins["cossh"] = sh.CoSSH
34 sh.Builtins["scp"] = sh.Scp
35 sh.Builtins["debug"] = sh.Debug
36 sh.Builtins["history"] = sh.History
37}
38
39// Cd changes the current directory.
40func (sh *Shell) Cd(cmdIO *exec.CmdIO, args ...string) error {

Callers 1

NewShellFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected