{"_id":"spawn-default-shell","_rev":"232651","name":"spawn-default-shell","description":"Spawn shell command with platform default shell","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"gustavohenke","email":"gustavo@injoin.com.br"},{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"}],"time":{"modified":"2021-06-03T15:47:27.000Z","created":"2016-09-18T21:25:24.599Z","2.0.0":"2016-10-01T10:10:25.699Z","1.1.0":"2016-09-30T20:31:46.685Z","1.0.0":"2016-09-18T21:25:24.599Z"},"users":{},"author":{"name":"Kimmo Brunfeldt"},"repository":{"type":"git","url":"git+https://github.com/kimmobrunfeldt/spawn-default-shell.git"},"versions":{"2.0.0":{"name":"spawn-default-shell","version":"2.0.0","description":"Spawn shell command with platform default shell","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/kimmobrunfeldt/spawn-default-shell.git"},"keywords":["shell","exec","bash","sh","command","cross-platform","windows","linux","mac"],"author":{"name":"Kimmo Brunfeldt"},"license":"MIT","bugs":{"url":"https://github.com/kimmobrunfeldt/spawn-default-shell/issues"},"homepage":"https://github.com/kimmobrunfeldt/spawn-default-shell#readme","devDependencies":{"eslint":"^3.5.0","eslint-config-airbnb-base":"^7.1.0","eslint-plugin-import":"^1.15.0","lodash":"^4.16.2","mocha":"^3.0.2","releasor":"^1.2.1"},"scripts":{"test":"npm run test-debug-print && mocha","test-debug-print":"node -e \"var a = require('./src/get-shell')(); console.log('> getShell()\\n' + JSON.stringify(a, null, 2));\"","lint":"eslint ./src ./test"},"gitHead":"c2fa8f85e39b7a5b1682ee153d4f6a1f135f628d","_id":"spawn-default-shell@2.0.0","_shasum":"fe058069f6663767529bab5ad5f9c94bfe4f1f47","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"},"dist":{"shasum":"fe058069f6663767529bab5ad5f9c94bfe4f1f47","size":5345,"noattachment":false,"key":"/spawn-default-shell/-/spawn-default-shell-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/spawn-default-shell/download/spawn-default-shell-2.0.0.tgz"},"maintainers":[{"name":"gustavohenke","email":"gustavo@injoin.com.br"},{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/spawn-default-shell-2.0.0.tgz_1475316623739_0.6833416530862451"},"directories":{},"publish_time":1475316625699,"_cnpm_publish_time":1475316625699,"_hasShrinkwrap":false},"1.1.0":{"name":"spawn-default-shell","version":"1.1.0","description":"Spawn shell command with platform default shell","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/kimmobrunfeldt/spawn-default-shell.git"},"keywords":["shell","exec","bash","sh","command","cross-platform","windows","linux","mac"],"author":{"name":"Kimmo Brunfeldt"},"license":"MIT","bugs":{"url":"https://github.com/kimmobrunfeldt/spawn-default-shell/issues"},"homepage":"https://github.com/kimmobrunfeldt/spawn-default-shell#readme","devDependencies":{"eslint":"^3.5.0","eslint-config-airbnb-base":"^7.1.0","eslint-plugin-import":"^1.15.0","lodash":"^4.16.2","mocha":"^3.0.2","releasor":"^1.2.1"},"scripts":{"test":"npm run test-debug-print && mocha","test-debug-print":"node -e \"var a = require('./src/get-shell')(); console.log('> getShell()\\n' + JSON.stringify(a, null, 2));\"","lint":"eslint ./src ./test"},"gitHead":"2c9535432cde35e18528921b50a261dcea6e1b86","_id":"spawn-default-shell@1.1.0","_shasum":"095439d44c4b7c0aff56a53929fbaab87878e7c6","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"},"dist":{"shasum":"095439d44c4b7c0aff56a53929fbaab87878e7c6","size":4975,"noattachment":false,"key":"/spawn-default-shell/-/spawn-default-shell-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/spawn-default-shell/download/spawn-default-shell-1.1.0.tgz"},"maintainers":[{"name":"gustavohenke","email":"gustavo@injoin.com.br"},{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/spawn-default-shell-1.1.0.tgz_1475267505391_0.4221811124589294"},"directories":{},"publish_time":1475267506685,"_cnpm_publish_time":1475267506685,"_hasShrinkwrap":false},"1.0.0":{"name":"spawn-default-shell","version":"1.0.0","description":"Spawn shell command with platform default shell","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/kimmobrunfeldt/spawn-default-shell.git"},"keywords":["shell","exec","bash","sh","command","cross-platform","windows","linux","mac"],"author":{"name":"Kimmo Brunfeldt"},"license":"MIT","bugs":{"url":"https://github.com/kimmobrunfeldt/spawn-default-shell/issues"},"homepage":"https://github.com/kimmobrunfeldt/spawn-default-shell#readme","devDependencies":{"eslint":"^3.5.0","eslint-config-airbnb-base":"^7.1.0","eslint-plugin-import":"^1.15.0","mocha":"^3.0.2","releasor":"^1.2.1"},"scripts":{"test":"mocha","lint":"eslint ./src ./test"},"gitHead":"3d9a9198b4d86164e25da77a281de58b962b6fc9","_id":"spawn-default-shell@1.0.0","_shasum":"3a220a05df090fbf6ad033818cb15d1bae009b14","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"},"dist":{"shasum":"3a220a05df090fbf6ad033818cb15d1bae009b14","size":3310,"noattachment":false,"key":"/spawn-default-shell/-/spawn-default-shell-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/spawn-default-shell/download/spawn-default-shell-1.0.0.tgz"},"maintainers":[{"name":"gustavohenke","email":"gustavo@injoin.com.br"},{"name":"kimmobrunfeldt","email":"kimmo.brunfeldt@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/spawn-default-shell-1.0.0.tgz_1474233922727_0.34408973273821175"},"directories":{},"publish_time":1474233924599,"_cnpm_publish_time":1474233924599,"_hasShrinkwrap":false}},"readme":"# spawn-default-shell\n\n> Spawn shell command with platform default shell\n\n[![Build Status](https://travis-ci.org/kimmobrunfeldt/spawn-default-shell.svg?branch=master)](https://travis-ci.org/kimmobrunfeldt/spawn-default-shell) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/kimmobrunfeldt/spawn-default-shell?branch=master&svg=true)](https://ci.appveyor.com/project/kimmobrunfeldt/spawn-default-shell) *master branch status*\n\n[![NPM Badge](https://nodei.co/npm/spawn-default-shell.png?downloads=true)](https://www.npmjs.com/package/spawn-default-shell)\n\nLike `child_process.spawn` with `shell: true` option but a bit more\nconvenient and customizable. You can just pass the command as a string,\nand it will be executed in the platform default shell. Used in [concurrently](https://github.com/kimmobrunfeldt/concurrently).\n\n```js\n// If we are in Linux / Mac, this will work\nconst defaultShell = require('spawn-default-shell');\nconst child = defaultShell.spawn('cat src/index.js | grep function');\n```\n\nPlatform | Command\n---------|----------\nWindows  | `cmd.exe /c \"...\"`. If `COMSPEC` env variable is defined, it is used as shell path.\nMac      | `/bin/bash -l -c \"...\"`\nLinux    | `/bin/sh -l -c \"...\"`\n\nYou can always override the shell path by defining these two environment variables:\n\n* `SHELL=/bin/zsh`\n* `SHELL_EXECUTE_FLAGS=-l -c` **Warning: execute flag must be the last flag.**\n\nAll `sh` variants will be called with `-l` flag (--login). It invokes the shell\nas a non-interactive login shell. In bash it means:\n\n> When bash is invoked as an interactive login shell, or as a non-inter-\n> active shell with the --login option, it first reads and executes commands\n> from the file /etc/profile, if that file exists. After reading\n> that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,\n> in that order, and reads and executes commands from the first one that\n> exists and is readable. The --noprofile option may be used when the\n> shell is started to inhibit this behavior.\n>\n> When  a  login  shell  exits, bash reads and executes commands from the\n> file ~/.bash_logout, if it exists.\n\n## Install\n\n```bash\nnpm install spawn-default-shell --save\n```\n\n## API\n\n### .spawn(command, [opts])\n\nSpawns a new process of the platform default shell using the given command.\n\nFor all options, see [child_process](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options)\ndocumentation.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/kimmobrunfeldt/spawn-default-shell#readme","bugs":{"url":"https://github.com/kimmobrunfeldt/spawn-default-shell/issues"},"license":"MIT"}