Documentation ¶
Index ¶
- Variables
- func Basename(path string) string
- func Cat(path string) string
- func Cd(path string)
- func Dirname(path string) string
- func Eprint(msg string)
- func Eprintf(format string, args ...any)
- func Exec(path string, args ...string) string
- func Flags(flags ...fflag.Flag) []string
- func Float(a string) float64
- func Glob(path string) []string
- func Int(a string) int64
- func IsAbs(path string) bool
- func IsRel(path string) bool
- func IterDir(path string, iter func(path string) bool)
- func Lstat(path string) *unix.Stat_t
- func Path(parts ...string) string
- func Print(msg string)
- func Printf(format string, args ...any)
- func ReadDir(path string) []string
- func ReadExec(path string, args ...string) []string
- func ReadFile(path string) []string
- func Size(a string) bytesize.Size
- func Stat(path string) *unix.Stat_t
- func Trim(input string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Env is the shell environment. Env = syscall.Environ() // Standard file descriptors. Stdin = fsys.Stdin() Stdout = fsys.Stdout() Stderr = fsys.Stderr() // Shell is the current user's shell binary. Shell = func() string { for _, kv := range Env { if strings.HasPrefix(kv, "SHELL=") { return kv[6:] } } panic("$SHELL not set") }() // Pwd is the current directory. Pwd = func() string { for _, kv := range Env { if strings.HasPrefix(kv, "PWD=") { return kv[4:] } } panic("$PWD not set") }() // Err stores last returned error. Err error )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.