All Projects → andrewchambers → janet-sh

andrewchambers / janet-sh

Licence: other
Shorthand shell like functions for janet.

Programming Languages

Janet
8 projects
c
50402 projects - #5 most used programming language

janet-sh

The rationale and design is partially covered in a blog post

Quick examples

(import sh)

# raise an error on failure.
(sh/$ touch foo.txt)

# raise an error on failure, return command output.
(sh/$< echo "hello world!")
"hello world!\n"

# return true or false depending on process success.
(when (sh/$? true)
  (print "cool!"))

# pipelines
(sh/$ cat ,path | sort | uniq)

# pipeline matching
(match (sh/run yes | head -n5)
  [0 0] :ok)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].