danielgtaylor / nesh

An enhanced, extensible interactive shell for Node.js and CoffeeScript
http://danielgtaylor.github.io/nesh/
MIT License
288 stars 27 forks source link

nesh REPL commands failing, maybe due to issue #6 ? #36

Closed minimalorganism closed 9 years ago

minimalorganism commented 9 years ago

Hi, Was really looking forward to using the .history command in nesh, but no joy:

me@there:~/me$ nesh --prompt "foo> " -e ./setup.js 
Node v0.12.7
Type .help for more information
foo> var bar = require('shelljs/global');
undefined
foo> .history
Invalid REPL keyword
undefined
foo> .hist
Invalid REPL keyword
undefined
foo> history
ReferenceError: history is not defined
...

If this is related to issue #6 feel free to comment and close this as a dupe. Danke,

minimal_o

ccheever commented 9 years ago

I'm not sure what the root cause is just yet but if you do ..history it works for me. Some keywords seem to have an extra dot prepended to them (clear, history, versions).

nesh*> .help
.cls    Clear the screen
.history    Show command history
.versions   Show Node version information
break   Sometimes you get stuck, this gets you out
clear   Alias for .break
doc Shows documentation for an expression; you can also type Ctrl-Q in-line
exit    Exit the repl
help    Show repl options
load    Load JS from a file into the REPL session
require Require a module and assign it to a variable with the same name
save    Save all evaluated commands in this REPL session to a file
minimalorganism commented 9 years ago

Oh sweet! I can handle that ( and would not have thought to try it ). Cheers and thanks.