Robert Mustacchi
de0b8d601c
jslint cleanup: path.js, readline.js, repl.js, tls.js, tty_win32.js, url.js
2011-07-29 11:58:02 -07:00
isaacs
c050d0fa19
Finish removing require.paths
...
Fix require() completion bug in repl, and correct man output
2011-07-24 18:04:45 -07:00
isaacs
205b9beb6b
Merge branch 'v0.4'
...
Conflicts:
lib/tls.js
lib/url.js
src/node_version.h
test/simple/test-buffer.js
test/simple/test-url.js
2011-05-07 20:38:32 -07:00
isaacs
bbffd9e502
Close #983 Better JSON.parse error detection
...
Previous pattern would only catch ILLEGAL, not { or other
known-but-unexpected JSON tokens.
2011-04-26 09:48:28 -07:00
Tim Baumann
6c7c4aeab6
Don't overwrite an user-specified repl.writer
2011-04-21 12:26:27 -07:00
Wade Simmons
d00739ce56
make it possible to do repl.start('', stream)
2011-04-21 12:20:50 -07:00
isaacs
0b3ecc05a6
Close #955 Change ^C handling in REPL
...
Press with text on the line: Cancels
Press on a bare line: Print a message
Press again on a bare line: Exit
2011-04-21 12:17:21 -07:00
Ben Weaver
d63a551f86
Update how REPLServer uses contexts
...
* Always use `this.context` or `self.context`.
* Move `resetContext` to `REPLServer.createContext`.
* Add `REPLServer.resetContext`, memoize `context` here.
* Memoize `exports.repl` in `start`.
Closes GH-851.
2011-04-11 16:52:23 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
isaacs
a48f73d0d3
Closes GH-232 Make the repl's global the right thing
2011-02-27 17:13:52 -08:00
isaacs
2cfe7b847d
Closes GH-184 Clear require cache on repl .clear
2011-02-27 17:07:08 -08:00
isaacs
f07041e6cd
Make the repl respect node_modules folders.
...
This is important so that in the future, this will work:
$ cd ~/dev/js/some-project
$ npm install redis
$ node
> require.resolve('redis')
'/Users/isaacs/dev/js/some-project/node_modules/redis/index.js'
2011-02-14 13:43:22 -08:00
Ryan Dahl
192d2e0803
REPL: disable colors in windows for now
2011-01-28 12:58:19 -08:00
Ryan Dahl
9e976abad9
lint
2011-01-24 10:55:30 -08:00
Ryan Dahl
ba80d4d8a9
Transfer data gathering responsibility to readline
...
Fixes non-raw REPL/Debugger on Posix.
2011-01-19 11:46:16 -08:00
Bert Belder
4475b76535
Readline: use symbolic key names instead of ascii control codes
2011-01-18 23:22:38 -08:00
Ryan Dahl
5a05992155
Lint
2011-01-06 16:06:27 -08:00
Bert Belder
1ac133ea6f
Replace string magic + path.join by path.resolve
...
Because path.resolve is more elegant and windows-safe.
2011-01-06 15:39:51 -08:00
Ryan Dahl
b6dafc1a47
Allow for two streams in REPL
...
Towards windows compatibility.
2011-01-06 13:42:32 -08:00
Ryan Dahl
feb77eab65
Fix REPL for named functions
...
add some tests.
2011-01-02 18:27:14 -08:00
Ryan Dahl
c82fe30ca1
repl.js style
2011-01-01 21:41:07 -08:00
Ryan Dahl
00974df3e5
Allow for evaling statements in REPL too
2011-01-01 21:05:23 -08:00
Ryan Dahl
b45698e676
Improve how REPL commands are evaled
...
Before:
> {a: 1}
1
> (function() {
... // foo
... return 1;
... })();
...
Now:
> {a: 1}
{ a : 1 }
> (function() {
... // foo
... return 1;
... })();
1
>
2011-01-01 17:54:48 -08:00
Brian White
6d75c06e64
Add os module to repl's built-in lib list
2010-12-16 17:37:00 -08:00
Brian White
e41e078159
Make sure REPL doesn't get borked when invalid REPL keywords are entered
2010-12-03 09:57:36 -08:00
Ryan Dahl
e232f6e735
more lint
2010-12-01 20:28:28 -08:00
Marco Rogers
118b88e44f
update repl to distinguish JSON.parse SyntaxErrors from the rest
2010-11-20 20:36:14 -08:00
Brian White
5908bdab9a
Make sure raw mode is disabled when exiting a terminal-based REPL.
2010-11-17 18:45:34 -08:00
Ryan Dahl
8e09b1e2e1
Simplify REPL displayPrompt
...
Now that we insert \r into the stream and aren't switching back and forth
between termios modes, not need to worry about when to display the prompt.
2010-11-12 14:39:42 -08:00
isaacs
bfc6b51d95
The cwdRequire hack is no longer necessary with the require.resolve refactor.
2010-10-20 15:22:02 -07:00
isaacs
226eff5104
Add require.resolve.
...
Also, hack the repl so that it works as expected there, too.
2010-10-20 12:12:07 -07:00
Sami Samhuri
56df0cbf93
new api for defining repl commands
2010-10-18 13:46:54 -07:00
Micheil Smith
e38eb0c5a4
Soft migration of sys -> util, Removal of deprecated utils module.
2010-10-11 15:21:36 -07:00
Ryan Dahl
783f5019b0
Add flag to disable colors in REPL
2010-10-09 12:46:06 -07:00
Sean Coates
ae87007478
add $ to variable name character matching patterns in repl completer
2010-10-09 10:04:13 -07:00
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
2010-10-06 20:40:57 -07:00
Ryan Dahl
5829716649
Fix REPL crash on tabbing 'this.'
...
Thanks to Tim Becker for pointing this out.
2010-10-01 11:31:22 -07:00
Ryan Dahl
d2de8ba400
^c to get out of '...' in REPL
2010-09-16 21:07:22 -07:00
Ryan Dahl
42eb5a6898
Simplify REPL
2010-09-16 20:50:56 -07:00
Trent Mick
1d961a6630
add ANSI coloring option to sys.inspect and, by default, to the repl
2010-09-08 09:47:13 -07:00
Trent Mick
293809b8b6
drop obsolete TODO comment
2010-08-18 23:02:54 -07:00
Trent Mick
5c1ffa165f
repl completion: completion for arguments to "require"
2010-08-18 22:59:49 -07:00
Trent Mick
2134982ea4
repl completion: comment/TODO cleanup, no functional change
2010-08-18 22:59:35 -07:00
Trent Mick
1c9a85b9a6
First pass at tab-completion in the REPL
2010-08-11 13:42:45 -07:00
Blake Mizerany
8c8534046c
fix whitespace errors
2010-06-29 23:59:24 -07:00
Ruben Rodriguez
242161bef2
Added new API to Script, and implemented it in the REPL
2010-06-28 15:16:26 -07:00
isaacs
e65e6039a8
Fix #169 . Expose require members in the repl.
...
This fixes #169 by putting the require members onto the cwdRequire function
which is exposed to the repl scope.
2010-06-11 14:04:58 -07:00
Ryan Dahl
adc06dd705
Add NODE_NO_READLINE check for REPL
...
Setting this environmental variable to a non-zero integer will start all
REPL interfaces without readline. For use with rlwrap.
2010-06-08 15:44:43 -07:00
Ryan Dahl
a6942b345d
Fix test-repl
2010-06-07 17:39:52 -07:00
Matt Ranney
09af242c89
Support more readline navigation keys.
2010-06-07 16:51:07 -07:00