{"_id":"bashful","_rev":"59-455da819db6933d3cef24f9db5570ac0","name":"bashful","description":"parse and execute bash without doing any IO","dist-tags":{"latest":"1.8.0"},"versions":{"0.0.0":{"name":"bashful","version":"0.0.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.2.7","duplexer":"~0.0.4","shell-quote":"~0.0.1","split":"~0.2.1"},"devDependencies":{"tap":"~0.4.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('bashful')(process.env);\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `echo [-neE] [arg ...]`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `false`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* ``\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `true`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.0.0","dist":{"shasum":"17dbf69e291d1aa02e3c25fc1bdc87764bfa7be7","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.0.0.tgz","integrity":"sha512-cAtzI0dyQTcCw9H+yyv6Hy3PxAHsOd7NXLEyVi+ISXt6L6GT044UlVcqcCc6cXsBqiL1oClmsxGt5nyjHcnS2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtWwuvFgIUXG9vZSJ6+WGD3jFm2fz8SIvrb1d8CJkQJAiA6uyViGZLacfsnyXbLmCP+gSfuGSqBfN81yE6VrcWfbQ=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.0.1":{"name":"bashful","version":"0.0.1","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.2.7","duplexer":"~0.0.4","shell-quote":"~0.0.1","split":"~0.2.1"},"devDependencies":{"tap":"~0.4.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('bashful')(process.env);\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `echo [-neE] [arg ...]`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `false`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `true`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.0.1","dist":{"shasum":"337b7000ea5bb625b39cc94b0638e27ea4fc68c1","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.0.1.tgz","integrity":"sha512-a8ne0TrdH524wXYDJQliLNQ5HlIo08/DkD+CJyqUgyAs9AWawmF6r99MuBEDLjV2FC+j9RRMKpcxYmmjUUcFBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXHI3ud8aB9UrLq+Z4+YXGAhjnh1k7grhg4snOx0/uhAiBKIuc50p8wfRbMbamgvq+nGLV4F067uRksSoerLI+kzg=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.1.0":{"name":"bashful","version":"0.1.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.2.7","duplexer":"~0.0.4","shell-quote":"~0.0.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('../')(process.env);\nbash.on('command', require('child_process').spawn);\n\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# methods\n\n``` js\nvar bash = require('bashfule')\n```\n\n## bash.createStream()\n\nCreate a duplex stream for the interpreter.\n\n# events\n\n## bash.on('command', function cb (cmd, args, opts) {})\n\nWhen the stream parses a non-builtin command, this event fires with the command\n`cmd`, its arguments `args` and the `opts.env` and `opts.cwd` of the current\nbash instance that can be passed directly into node core's\n`child_process.spawn()`.\n\nIf the `cb` listener wants to provide an implementation of the command `cmd`, it\nshould return a duplex stream or an object with `\"stdin\"`, `\"stdout\"`, and\noptionally `\"stderr\"` streams.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* filename [arguments]\n* `echo [-neE] [arg ...]`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `false`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `true`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.1.0","dist":{"shasum":"366ff6902bca768561b9ffc390950d7bf9cef99a","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.1.0.tgz","integrity":"sha512-GIZqG+QLre2hxpQ8aTG+lKL8WCw94e8czavtbZg/0sLqBt4oe9AVmFYBMddJPqED5jSk0O64L3+C99gz4MSI1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6HtQyiaDtxDGcqq29MG74MhEEGorRRxKg2FGrRI7Y5AiEA84H01QJVQbNnrAW/YdYIUtpFZ9zy3nZkG53ZlTA3iRQ="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.2.0":{"name":"bashful","version":"0.2.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","duplexer":"~0.0.4","shell-quote":"~1.3.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('../')(process.env);\nbash.on('command', require('child_process').spawn);\n\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# methods\n\n``` js\nvar bash = require('bashfule')\n```\n\n## bash.createStream()\n\nCreate a duplex stream for the interpreter.\n\n# events\n\n## bash.on('command', function cb (cmd, args, opts) {})\n\nWhen the stream parses a non-builtin command, this event fires with the command\n`cmd`, its arguments `args` and the `opts.env` and `opts.cwd` of the current\nbash instance that can be passed directly into node core's\n`child_process.spawn()`.\n\nIf the `cb` listener wants to provide an implementation of the command `cmd`, it\nshould return a duplex stream or an object with `\"stdin\"`, `\"stdout\"`, and\noptionally `\"stderr\"` streams.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`\n* `$?`\n* filename [arguments]\n* `echo [-neE] [arg ...]`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `false`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `true`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.2.0","dist":{"shasum":"f8949cfe9f7356bddcb096cc4953cfd6186282b5","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.2.0.tgz","integrity":"sha512-uptXYSPIX6BjygGS7lhugIS4doTO+5mIrktiT+0LRjDr3GnI2HRQnsKx3DxlHoVdl+jbn+1dU4y4Lr6JK53l4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKv+QcLMZdcdiL/FohjmCe610pvvGD+WmenHXpITzGdAiEAlQN3rN64QH8K41B3nnXnvar7R9b1J++j6UwD/002Mn4="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.3.0":{"name":"bashful","version":"0.3.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","duplexer":"~0.0.4","shell-quote":"~1.3.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('../')(process.env);\nbash.on('command', require('child_process').spawn);\n\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# methods\n\n``` js\nvar bash = require('bashfule')\n```\n\n## bash.createStream()\n\nCreate a duplex stream for the interpreter.\n\n# events\n\n## bash.on('command', function cb (cmd, args, opts) {})\n\nWhen the stream parses a non-builtin command, this event fires with the command\n`cmd`, its arguments `args` and the `opts.env` and `opts.cwd` of the current\nbash instance that can be passed directly into node core's\n`child_process.spawn()`.\n\nIf the `cb` listener wants to provide an implementation of the command `cmd`, it\nshould return a duplex stream or an object with `\"stdin\"`, `\"stdout\"`, and\noptionally `\"stderr\"` streams.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`\n* `$?`\n* filename [arguments]\n* `echo [-neE] [arg ...]`\n* `false`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.3.0","dist":{"shasum":"292334678f27a091e4df783bfe3f6e5a0def2606","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.3.0.tgz","integrity":"sha512-sFs0+G1d44v1AZE7z1+LByn/M/LIRbbOTqa1FFgm+k4imfikC5H1htDGVfzTxE7Zq4j1dgBYRX1pKbTwLuUpNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeFemu4LJwkEpj8Lb0O8g6L8fzk7R/WVfvbJtK+gIV4AiALX1LoGUJvwwZHkdt0hLSqRYMT3ubKSFJ4HBqZkfcaAQ=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.4.0":{"name":"bashful","version":"0.4.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","duplexer":"~0.0.4","shell-quote":"~1.3.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('../')(process.env);\nbash.on('command', require('child_process').spawn);\n\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n```\n\n# methods\n\n``` js\nvar bash = require('bashfule')\n```\n\n## bash.createStream()\n\nCreate a duplex stream for the interpreter.\n\n# events\n\n## bash.on('command', function cb (cmd, args, opts) {})\n\nWhen the stream parses a non-builtin command, this event fires with the command\n`cmd`, its arguments `args` and the `opts.env` and `opts.cwd` of the current\nbash instance that can be passed directly into node core's\n`child_process.spawn()`.\n\nIf the `cb` listener wants to provide an implementation of the command `cmd`, it\nshould return a duplex stream or an object with `\"stdin\"`, `\"stdout\"`, and\noptionally `\"stderr\"` streams.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`\n* `$?`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@0.4.0","dist":{"shasum":"133d050c6356b6474817f42a9069afc39053e8c0","tarball":"https://registry.npmjs.org/bashful/-/bashful-0.4.0.tgz","integrity":"sha512-tQOmnwij4XW/w43EjToCpOeQjhiKzr28mDGNUdqhDh+S9J0rG4IozZb5k7tB/FUrGpmaae0eMKFkElJE3JD9SA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDV7HZ7k6N6RRSQrpY60VZ3EgmKpXARzFxYd6SCVplNgIgC9qrTTI6qpmE2wQW2BnRSsI96iAUfvWVLkF4W85ZYwY="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.0.0":{"name":"bashful","version":"1.0.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","duplexer":"~0.0.4","shell-quote":"~1.3.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","_id":"bashful@1.0.0","dist":{"shasum":"c810548fc6e5025562262aaacb5e0ab88f218835","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.0.0.tgz","integrity":"sha512-XABK8zj8ouqqSfxIHn+3Tam+yWyLHCLWQCw/jyJV8BA+r60Rm9aEcgBjJL5S8n5dVRXZjaMf5jUVhQSlKwhaow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1Rh2DvNjEGnRpYcYnYIpo3/nU6tRT/0Ni16Xnz8aE5AiBC6aCQsPlnyulc7fZuiXkXQay7bMdc4pKm7kbSt3R25w=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.1.0":{"name":"bashful","version":"1.1.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","split":"~0.2.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.1.0","dist":{"shasum":"cb80678c22a08700782ccfeb40545680d045477d","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.1.0.tgz","integrity":"sha512-L+jXhh10/qYVLh4gMYPbtFS8gj0h683r3vwUgL/9guif2+0Co+Ln/6UF1fo3wXYaL+8HNyWtJjrvDxIJEESblg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFauS+sMglut5JtPHLwCxQ7FLXN1cT3MhESyJWd8WXD8AiAtdF4JTNOcWjynvxNY50EV+IQYzBmv/ej6RfJZuEYWZg=="}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.2.0":{"name":"bashful","version":"1.2.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","split":"~0.2.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.2.0","dist":{"shasum":"9ed9262583249f3333a4a9d014a54728f6344459","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.2.0.tgz","integrity":"sha512-VRVYdJiNBYy/4+UWYz69UP52EH44F61vrdOKNBi+RNE4SnRHGCzVACdkA8/DTlTTykJK49FyKQhsYWMraWsdew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBTYueAAtC8j+QICuxGcVXlP2j3+0uyu7vM0XKONFG4eAiAnhoTGHnBInHaG9IOGA2HaQeycO2n3w9mw4HHUtRnF/g=="}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.2.1":{"name":"bashful","version":"1.2.1","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","split":"~0.2.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.2.1","dist":{"shasum":"d166faff37243fcc5e304a281a6a4d7f3847fce5","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.2.1.tgz","integrity":"sha512-hX7RrmulhhW+ZlLvtKY6Kjugtf1nJyyiB77e7OhnfKyWGBRqK+L3SDdf1vSSbePCMhJifgEOrwC/lIjk2QnBJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbl2y7sS1i1bJAZ6o5L8HHwktU13FFt0intW7g5KIdbQIgBSN1P9YWHQ85Gc5kO6uGX8iX9/AfQpq5VQWJT7PpLtA="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.3.0":{"name":"bashful","version":"1.3.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.3.0","dist":{"shasum":"5a57b0f3b98f610f8fc32393b56d550a8fd94346","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.3.0.tgz","integrity":"sha512-GoRdF4DF2+6uNEUCHmxIbAUk9U0jf8J4xJqwZWCZE2D8pJBC3/g9tATc5cz4Ul5TsaE2yoJRDa7wGfViGR6fWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS+pxmbgaVrSq1P01cQ72+fOIKAip2V3bo/3ZucRxP7QIgV8WWGi28+2OgGH2pHqJZVjVRKVcZqANPlTBLFymy+Gg="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.3.1":{"name":"bashful","version":"1.3.1","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.3.1","dist":{"shasum":"56142aa9c0ebbac9f3dcb0370e7ee68dc2a52f3f","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.3.1.tgz","integrity":"sha512-lm4PDN5IjcRBU2wyiy9F4VRXLD9p6HJvZWa7JUB639MhVdyV1Zygmkz1gFdZu8aOdpOktvZJ3IH0DN8AyooU8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFlmJGlpN1C1+dnWiXLcEHVyC3zUyHXoDux0FTKP7tmAiEArwgD73C4dX4xgiKMeErHmgQ2AvRQ5y3jCXHhBbHg/FA="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.3.2":{"name":"bashful","version":"1.3.2","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.3.2","dist":{"shasum":"8265138ed31a7f8d981a3ff4a1b4743830f3fd05","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.3.2.tgz","integrity":"sha512-BuyL3CaZYwQ8IIIIs9rAxjLvXLluUTnYuqOkyDRsuyeKcrRWsyx0MHRxeW+xuY1Pxr/ZkBIHmy1NLydkxOhO9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEduECIH4xbRLDMCelQH3kqIHQk58lDAsbeTj4s63m5rAiAAmkddDXsKTjqXNIJQoG5TLOV9k+kByP6YVujkyswULw=="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.4.0":{"name":"bashful","version":"1.4.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.4.0","dist":{"shasum":"57a1a1d7e2e94759e9dfa537895aaa96a996e494","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.4.0.tgz","integrity":"sha512-8GpmLEoxbyUyeDmJs276mC21PDymfklBg3eJ/W9wlfAhaY0LFX+d/t96ZUUPcRIBd1LanyUX4EFgY6aP8CEzVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBiIzGoOMkpfmbJoWMm+aHcRrCRDdgNlYJvmg2DlSQqgIgWbIlOO1lwQ4iuk2oI2pEX39bn5FtZsdsM3N6jTldypA="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.4.1":{"name":"bashful","version":"1.4.1","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.4.1","dist":{"shasum":"7869eff728fd3bc79c07620eea9e9df6d00e0d18","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.4.1.tgz","integrity":"sha512-DUKKpn3GByDRC/LSoRtR1t3bGc7W7kftrxURbeeJ1ZgqahFfoBRYxXrqqsUZvcOXW87bCmKQpX/fwLU0bomhww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnOAfdhbTgAo/5YnMBxyXn2JSi2B2/V1/e1XYwStTbMgIhAJCAFh8gzKxFY8eU9TNo3YjU8AYMcnt7M3WOr/hgJrmL"}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.4.2":{"name":"bashful","version":"1.4.2","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.4.2","dist":{"shasum":"b211bc730f76814712bcbbca7cfcca9a5b34568a","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.4.2.tgz","integrity":"sha512-ssfkt/0UQhrHxMzSgn0CGRxZZOiEapbIeaw16UWw2tA8phnQWLMCEFVikJYyid9HqXNCOT4qhHJeIdpFdja99A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG5zgdTuwL6Ep8R69Ww4UQk0/7ajXwoWP97qk46PDiFRAiBSWXMmfV2JZg21OfWwmc4MdDGa8oIb8+KOq/jrYxFwrw=="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.4.3":{"name":"bashful","version":"1.4.3","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.3.3","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.4.3","dist":{"shasum":"812151e9d4c6eb627a36be27d59dd8e8869af302","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.4.3.tgz","integrity":"sha512-vUKU1Uqv5SzNhQf2jI7EpW0ufqKNBxQSmm5b/hmHsP9x74YU9Pt0LpjLdIKEVs/fQw3abLxrJ6tD9shljy2JaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbzbLtVjiXDYO1fJsiKNdHw3k9jq5pRQr9WnSnaN8ZVAiAF2YidCUfLPhTWjp6BSq0IBIdNV6kcNdLY7ci/O1+TxA=="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.5.0":{"name":"bashful","version":"1.5.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.4.0","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.5.0","dist":{"shasum":"752bc8dbab7df24f0e4e11ac72619ec2547e4606","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.5.0.tgz","integrity":"sha512-FK7RJPTGCMgPNMvmjwrCe0v3Wq6UCV2KxhD6r0j/VdLAcZKk5EcpT+pRQQdEjYtqe4xIUPq2FtkDkRjD3L53uQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6KQ3jP1w/dZxKeANywCN+xR5teu2pMsUzbnYdSrE0PAiBqUVqBlHhulrQACUIFc2jeljeRCBwOQAyA2H65AhS9Cw=="}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.6.0":{"name":"bashful","version":"1.6.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.4.0","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.0","concat-stream":"~0.1.1","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.6.0","dist":{"shasum":"a7e28035cda1c9e0e342c2e93c8586adf088f400","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.6.0.tgz","integrity":"sha512-Tv/gALlHSp8Ld2dgswutZMHTBhTK09fPI3urTZNBisltM7w7WyRV9r8Glbj5h/5H21TrEeX/qse8T5rG7QqfCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYNGp4Q7zH9+C6B9XVlsJjPU49tEbSO55LLsi11Y/qPAIhAPrpZfCEWHPfTJuBtLdiN9C7ruWtWoSW2sJ4D3bSdCm9"}]},"_from":".","_npmVersion":"1.3.7","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.7.0":{"name":"bashful","version":"1.7.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.4.0","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0"},"devDependencies":{"tap":"~0.4.4","concat-stream":"~1.2.0","mkdirp":"~0.3.5"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n## bash.on('detach', function (index, cmd) {})\n\nWhen a process gets detached (with the `&` operator), this event fires with the\njob `index` and the process reference or stream object `cmd`.\n\nYou can also check the `cmd.command` and `cmd.arguments` to get the command and\narguments of the original invocation.\n\n## bash.on('done', function (index, cmd) {})\n\nWhen a detached process exits, this event fires with the job `index` and the\nprocess reference or stream object `cmd`.\n\nYou can also check the `cmd.command` and `cmd.arguments` to get the command and\narguments of the original invocation.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `job_spec [&]`\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.7.0","dist":{"shasum":"0cdfeb27f97ee710826c55a6fabc1b62ac35c710","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.7.0.tgz","integrity":"sha512-MyawmxMfzrPl1+MTIIxTVOVrckLRyjO+JFS92o43cEou9YLAK7IvuwkFKjbZ31uz7B8UNn9RzqEbZV+eR1Q19Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsaolU6wxFm0ebG3Z/QA1OJN1FJLUkLejx5eSg65U0HgIhAO8bHYC8oruK+m4QQTJtlfKW7DDVe+pjOHLvQK0ZyOoT"}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"1.8.0":{"name":"bashful","version":"1.8.0","description":"parse and execute bash without doing any IO","main":"index.js","dependencies":{"through":"~2.3.4","resumer":"~0.0.0","duplexer":"~0.0.4","shell-quote":"~1.4.0","decode-prompt":"~0.0.1","minimist":"~0.0.1","inherits":"~1.0.0","rotate-array":"~0.1.0"},"devDependencies":{"tape":"~2.1.0","concat-stream":"~1.2.0","mkdirp":"~0.3.5"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"homepage":"https://github.com/substack/bashful","keywords":["bash","shell"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n[![build status](https://secure.travis-ci.org/substack/bashful.png)](http://travis-ci.org/substack/bashful)\n\n# example\n\nusing the default line-buffering in node:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n$ echo beep boop | wc -c\n10\n$ false || true && echo bleep\nbleep\n$ echo ONE TWO THREE > outfile.txt\n$ cat outfile.txt\nONE TWO THREE\n$ wc -c < outfile.txt\n14\n```\n\n# raw mode\n\nin raw mode, you get history with up/down arrows, jumping around with\nleft/right/home/end, and control characters like ^C and ^D:\n\n``` js\nvar bash = require('bashful');\nvar fs = require('fs');\n\nvar sh = bash({\n    env: process.env,\n    spawn: require('child_process').spawn,\n    write: fs.createWriteStream,\n    read: fs.createReadStream,\n    exists: fs.exists\n});\nsh.on('close', process.exit);\n\nprocess.stdin.on('data', function (buf) {\n    if (buf[0] === 13) process.stdout.write('\\n');\n    else if (buf[0] > 27 && buf[0] < 127) {\n        process.stdout.write(buf);\n    }\n});\nprocess.stdin.setRawMode(true);\n\nvar s = sh.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n# methods\n\n``` js\nvar bash = require('bashful')\n```\n\n## var sh = bash(opts)\n\nCreate a new bashful shell `sh` from `opts`:\n\n* `opts.env` - environment variables to use\n* `opts.write(file)` - return a writable stream for `file`\n* `opts.read(file)` - return a readable stream for `file`\n* `opts.exists(file, cb)` - query whether `file` exists or not as the first\nargument to `cb(ex)`\n* `opts.spawn(cmd, args, opts)` - return a process object or a stream\n* `opts.custom` - array of builtin keywords to delegate to `opts.spawn()`\n\n## sh.createStream()\n\nCreate a duplex stream for the interpreter.\nWrite commands, read command output.\n\n## sh.eval(expr)\n\nReturn a duplex stream for a single command expression `expr`.\n`expr` can have all the fanciness of pipes and control characters but won't\nsplit commands on newlines like `sh.createStream()` will.\n\n# events\n\n## bash.on('spawn', function (cmd, args, opts) {})\n\nJust before a command is executed, this event fires.\n\n## bash.on('read', function (file) {})\n\nJust before a file is read, this event fires.\n\n## bash.on('write', function (file) {})\n\nJust before a file is written to, this event fires.\n\n## bash.on('detach', function (index, cmd) {})\n\nWhen a process gets detached (with the `&` operator), this event fires with the\njob `index` and the process reference or stream object `cmd`.\n\nYou can also check the `cmd.command` and `cmd.arguments` to get the command and\narguments of the original invocation.\n\n## bash.on('done', function (index, cmd) {})\n\nWhen a detached process exits, this event fires with the job `index` and the\nprocess reference or stream object `cmd`.\n\nYou can also check the `cmd.command` and `cmd.arguments` to get the command and\narguments of the original invocation.\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `job_spec [&]`\n* `&&`, `;`, `||`, `|`, `<`, `>`\n* `$?`\n* `cd [-L|[-P [-e]]] [dir]`\n* `echo [-neE] [arg ...]`\n* `eval [arg ...]`\n* `exit [n]`\n* `false`\n* `filename [arguments]`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `true`\n\n## not yet implemented\n\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `exec [-cl] [-a name] [command [argume>`\n* `export [-fn] [name[=value] ...] or ex>`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/bashful/issues"},"_id":"bashful@1.8.0","dist":{"shasum":"92dd6d485a79965dc8b95988da28bd4d7ef0bf70","tarball":"https://registry.npmjs.org/bashful/-/bashful-1.8.0.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2kdmCRA9TVsSAnZWagAA/pUP/0sd1hRsbXGC7DnXV/xS\nrZ7xREJ4/gcL/yhDEC/N3fGy3NT7mY2khT4uVasTc+xp4kmIyPnu/92aARpz\nr/TROr8YVt3IGugF8bPU55BdzF/zhdUkxcnfWVHRYaDuPKET7+My9qkMmSPo\nv1N7XLCNAaDJ2sqkc+c+41i+qhFydtf/kd1gv0LaoBwG+uqhbwyg5t719oan\nfvQyGrhgEP4BUxdStnhnn6EHhtjPDd/yvpzRvqw/jzY0y5/TtN9sZLO4aTuy\nGCBuzCT45yUL+fUTj4Bd1skvXEp3J1aRMwPVvBdX4xoDQWNw/YMV64ofWpVO\nvJrWeNK8iy5d57J72CZdxXtpk7gWySncg4PGxQIVdmDoGLJmlCirseLakvVt\ncBWUfPOioBr3F+OExY7hIhiep4PtB+8UImqxPSzXXtbYleF5a8EkLP/8sei3\nGpWWKgfVxkHMwsbFvHzimUkaeFLHvUefbVN8G/HKEHbWzQWwt/a+ubrFur2/\nkuUYXzHcHQvoFnKrswLdXS1j0DAOoMc5NL+YnEj/1pkvlQ8NqYKtRc2KBcVi\nDdpTg7k5/lPEbpAYndMTjocFOZKlAstrKAmBmZjtFMPyT0h+0dJqz13pR9Fd\nKanTqMIy2lkuskbaTnrA8ULmDg8DX3iHRKBlBDjhJ23s56Z6b2+TDr10B9Kd\n6+I0\r\n=KC3i\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-MKv10cPgxb1ysdlDyGaJmejEXy1DlpPC29Za9PfAdsWiEsQvJgGIXh9l24YN4Arep62Yy3t7b1phRlVlAPLmkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmj1GNnFCg39c1P+967/KUmNB+Mv6530dI0JxDqpFA5gIgLATodEemw7o2oK0MDWUNjI/hzd+nPCxLnzuQ1+bKAE4="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}}},"readme":"# bashful\n\nParse and execute bash in javascript without doing any IO\nso you can use your own IO backend.\n\n# example\n\n``` js\nvar bash = require('bashful')(process.env);\nvar s = bash.createStream();\nprocess.stdin.pipe(s).pipe(process.stdout);\n```\n\n```\n$ node example/sh.js \n$ echo hello\nhello\n$ echo $PWD\n/home/substack/projects/bashful\n$ beep boop\nNo command \"beep\" found\n```\n\n# status\n\nThe scope of this module is to only support the internally-defined bash\nfunctions you can list by typing `help` in a real bash shell.\n\n## implemented\n\n* `echo [-neE] [arg ...]`\n\n## not yet implemented\n\n* `job_spec [&]`\n* `(( expression ))`\n* `. filename [arguments]`\n* `:`\n* `[ arg... ]`\n* `[[ expression ]]`\n* `alias [-p] [name[=value] ... ]`\n* `bg [job_spec ...]`\n* `bind [-lpvsPVS] [-m keymap] [-f filen>`\n* `break [n]`\n* `builtin [shell-builtin [arg ...]]`\n* `caller [expr]`\n* `case WORD in [PATTERN [| PATTERN]...)>`\n* `cd [-L|[-P [-e]]] [dir]`\n* `command [-pVv] command [arg ...]`\n* `compgen [-abcdefgjksuv] [-o option]  >`\n* `complete [-abcdefgjksuv] [-pr] [-DE] >`\n* `compopt [-o|+o option] [-DE] [name ..>`\n* `continue [n]`\n* `coproc [NAME] command [redirections]`\n* `declare [-aAfFgilrtux] [-p] [name[=va>`\n* `dirs [-clpv] [+N] [-N]`\n* `disown [-h] [-ar] [jobspec ...]`\n* `enable [-a] [-dnps] [-f filename] [na>`\n* `eval [arg ...]`\n* `exec [-cl] [-a name] [command [argume>`\n* `exit [n]`\n* `export [-fn] [name[=value] ...] or ex>`\n* `false`\n* `fc [-e ename] [-lnr] [first] [last] o>`\n* `fg [job_spec]`\n* `for NAME [in WORDS ... ] ; do COMMAND>`\n* `for (( exp1; exp2; exp3 )); do COMMAN>`\n* `function name { COMMANDS ; } or name >`\n* `getopts optstring name [arg]`\n* `hash [-lr] [-p pathname] [-dt] [name >`\n* `help [-dms] [pattern ...]`\n* ``\n* `history [-c] [-d offset] [n] or hist>`\n* `if COMMANDS; then COMMANDS; [ elif C>`\n* `jobs [-lnprs] [jobspec ...] or jobs >`\n* `kill [-s sigspec | -n signum | -sigs>`\n* `let arg [arg ...]`\n* `local [option] name[=value] ...`\n* `logout [n]`\n* `mapfile [-n count] [-O origin] [-s c>`\n* `popd [-n] [+N | -N]`\n* `printf [-v var] format [arguments]`\n* `pushd [-n] [+N | -N | dir]`\n* `pwd [-LP]`\n* `read [-ers] [-a array] [-d delim] [->`\n* `readarray [-n count] [-O origin] [-s>`\n* `readonly [-aAf] [name[=value] ...] o>`\n* `return [n]`\n* `select NAME [in WORDS ... ;] do COMM>`\n* `set [-abefhkmnptuvxBCHP] [-o option->`\n* `shift [n]`\n* `shopt [-pqsu] [-o] [optname ...]`\n* `source filename [arguments]`\n* `suspend [-f]`\n* `test [expr]`\n* `time [-p] pipeline`\n* `times`\n* `trap [-lp] [[arg] signal_spec ...]`\n* `true`\n* `type [-afptP] name [name ...]`\n* `typeset [-aAfFgilrtux] [-p] name[=va>`\n* `ulimit [-SHacdefilmnpqrstuvx] [limit>`\n* `umask [-p] [-S] [mode]`\n* `unalias [-a] name [name ...]`\n* `unset [-f] [-v] [name ...]`\n* `until COMMANDS; do COMMANDS; done`\n* `variables - Names and meanings of so>`\n* `wait [id]`\n* `while COMMANDS; do COMMANDS; done`\n* `{ COMMANDS ; }`\n","maintainers":[{"email":"nopersonsmodules@gmail.com","name":"nopersonsmodules"}],"time":{"modified":"2022-11-11T06:33:14.210Z","created":"2013-03-31T06:31:14.662Z","0.0.0":"2013-03-31T06:31:15.733Z","0.0.1":"2013-03-31T06:40:33.873Z","0.1.0":"2013-04-04T08:36:31.347Z","0.2.0":"2013-05-13T13:56:04.545Z","0.3.0":"2013-05-13T14:09:10.202Z","0.4.0":"2013-05-14T00:52:05.959Z","1.0.0":"2013-05-14T03:54:29.150Z","1.1.0":"2013-06-24T13:31:29.989Z","1.2.0":"2013-06-25T09:47:20.147Z","1.2.1":"2013-08-06T02:12:48.164Z","1.3.0":"2013-08-06T06:44:04.133Z","1.3.1":"2013-08-06T06:48:23.593Z","1.3.2":"2013-08-06T07:43:38.753Z","1.4.0":"2013-08-08T09:12:34.548Z","1.4.1":"2013-08-08T09:15:27.002Z","1.4.2":"2013-08-08T10:52:27.579Z","1.4.3":"2013-08-08T10:58:55.641Z","1.5.0":"2013-10-18T01:57:59.720Z","1.6.0":"2013-10-18T17:46:37.004Z","1.7.0":"2013-11-19T10:47:18.487Z","1.8.0":"2013-11-25T00:15:58.229Z"},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git://github.com/substack/bashful.git"},"users":{"knownasilya":true,"tunnckocore":true,"rabe.io":true,"nwinant":true}}