Take starlark
, take go
and wrap them into a cross-plat shell of sorts.
Motivation is to do basic shell tasks in bazel
with something cross-plat, easy
to provision via bazel
and which tastes like starlark
.
See ./quicktest.nosh for examples.
-
print / printf
-
assert
-
regex
-
defer
-
signal handling
-
set -e (NOTE: there's no exceptions in starlark)
-
set -x
-
json
-
math
-
xml
-
ini/cfg (?)
-
glob/globby
-
hash
-
base64
-
templating
-
getenv/setenv
-
expand env
- also expand ~ tilde ?
-
sleep
-
dates
-
parallel
-
args
-
cli / argparse ?
-
cli -c
-
tee
-
os.run
- capture
- env
- pipes
- redirections
- background
- timeouts
-
os.distro/kind/os-type/uname
-
os.pkill <name-*>
-
os.getTempDir
-
os.sendSignal
-
os.registry (WIN-ONLY)
-
os.random
-
os.clipboard
-
fs.chdir / cd
-
fs.popd
-
fs.pwd / pwd
-
fs.find
-
fs.join
-
fs.realpath
-
fs.basename
-
fs.symlink-handling
-
fs.copy
-
fs.move
-
fs.exists
- fs.is_file
- fs.is_dir
-
fs.mkdir
-
fs.samefile
-
fs.stat
-
fs.read
-
fs.write
-
fs.remove
-
fs.touch
-
fs.mktemp
-
fs.watch
-
net.ping
-
net.curl