Comparing version 0.3.3 to 0.3.4
{ | ||
"name": "n_shell", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "A node REPL with ShellJS loaded by default", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -111,7 +111,7 @@ # n\_shell | ||
- `--inspect`: an experimental switch to add a `.inspect()` method to the | ||
output of each command, to make it less cluttered and more shell-like. This | ||
doesn't change the return values, it only changes what they look like on the | ||
REPL. This is recommended for shelljs v0.7+. | ||
**Note**: the `--inspect` option is not available for `--local` mode. | ||
Credit for the idea goes to [piranna](https://github.com/piranna). | ||
output of each command. The return values are still ShellStrings, but appear | ||
more readable and shell-like. Also, commands with no arguments can be | ||
invoked without parentheses, such as `shell.pwd` and `shell.ls`. Recommended | ||
for ShellJS v0.7+. Credit for the idea goes to | ||
[piranna](https://github.com/piranna). | ||
@@ -118,0 +118,0 @@ ## History |
@@ -71,3 +71,3 @@ 'use strict'; | ||
}; | ||
outerRet.inspect = function () { return this(); }; | ||
outerRet.inspect = outerRet.inspect || function () { return this(); }; | ||
return outerRet; | ||
@@ -78,2 +78,10 @@ } | ||
argv.no_global = argv.no_global || argv.local || argv.n; | ||
// Add inspect() method, if it doesn't exist | ||
if (argv.inspect) { | ||
for (var key in shell) { | ||
shell[key] = wrap(shell[key], key); | ||
} | ||
} | ||
if (argv.no_global) { | ||
@@ -85,3 +93,3 @@ if (typeof argv.no_global !== 'string') | ||
for (var key in shell) { | ||
replServer.context[key] = argv.inspect ? wrap(shell[key], key) : shell[key]; | ||
replServer.context[key] = shell[key]; | ||
} | ||
@@ -88,0 +96,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7608
20
89