Skip to content

bash syntax and gnu coreutils in javascript. async version of shelljs

License

Notifications You must be signed in to change notification settings

milahu/shelljs-async

Repository files navigation

shelljs-async

bash syntax and gnu coreutils in javascript

async version of shelljs

web version of cash

  • works in a web browser
    • browserfs
    • xterm.js
  • async by default
  • emulate an interactive shell
    • parse input strings from a bash prompt

status

proof of concept

examples

await ls(".").print()
/*
test.txt
hello.txt
readme.md
src
demo
*/

await ls(".").debug()
/*
stream 1: chunk: "test.txt\n"
stream 1: chunk: "hello.txt\n"
stream 1: chunk: "readme.md\n"
stream 1: chunk: "src\n"
stream 1: chunk: "demo\n"
*/

await ls(".").pipe(grep).stdout()
/*
grep: test.txt
grep: hello.txt
grep: readme.md
grep: src
grep: demo
*/

await cat("test.txt").print()
/*
Cool, I can do this in the browser!
*/

await seq(20).pipe(head, "-n", "5").print()
/*
1
2
3
4
5
*/

challenges

signals

every consumer process can send signals to the producer process

reading

generators

similar projects

About

bash syntax and gnu coreutils in javascript. async version of shelljs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published