dop 0.2.2

Process, transform and query JSON/YAML/TOML, from the shell.
# execute command and assign value

# INPUT

[1,2,3]

# SCRIPT

set(tonumber(exec(string.format("echo $((%d * 2))", VALUE)).output))

# EXPECT

[2,4,6]

---

# execute with pipes

# INPUT

[1,2,3]

# SCRIPT

set(tonumber(exec(string.format("echo '%d * 2' | bc", VALUE)).output))

# EXPECT

[2,4,6]

---

# execute and inspect the exit status code

# INPUT

["ls", "ls this_folder_does_not_exist"]

# SCRIPT

set(exec(VALUE).status == 0)

# EXPECT

[true,false]