src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/mods/unix/unix.go (about) 1 //go:build unix 2 3 // Package unix exports an Elvish namespace that contains variables and 4 // functions that deal with features unique to Unix-like operating systems. On 5 // non-Unix operating systems it exports an empty namespace. 6 package unix 7 8 import ( 9 "src.elv.sh/pkg/eval" 10 "src.elv.sh/pkg/eval/vars" 11 "src.elv.sh/pkg/logutil" 12 ) 13 14 // ExposeUnixNs indicate whether this module should be exposed as a usable 15 // elvish namespace. 16 const ExposeUnixNs = true 17 18 // Ns is an Elvish namespace that contains variables and functions that deal 19 // with features unique to Unix-like operating systems. 20 var Ns = eval.BuildNs(). 21 AddVars(map[string]vars.Var{ 22 "umask": UmaskVariable{}, 23 "rlimits": rlimitsVar{}, 24 }).Ns() 25 26 var logger = logutil.GetLogger("[mods/unix] ")