github.com/xyproto/u-root@v6.0.1-0.20200302025726-5528e0c77a3c+incompatible/cmds/core/elvish/eval/builtin_ns.go (about)

     1  package eval
     2  
     3  import (
     4  	"strconv"
     5  	"syscall"
     6  
     7  	"github.com/u-root/u-root/cmds/core/elvish/eval/vars"
     8  )
     9  
    10  var builtinNs = Ns{
    11  	"pid":   vars.NewRo(strconv.Itoa(syscall.Getpid())),
    12  	"paths": &EnvList{envName: "PATH"},
    13  	"pwd":   PwdVariable{},
    14  }
    15  
    16  func addBuiltinFns(fns map[string]interface{}) {
    17  	builtinNs.AddBuiltinFns("", fns)
    18  }