0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

444 Commits

Author SHA1 Message Date
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
Ryan Dahl
41f213be18 Add binding to termios, implement readline for repl 2010-06-07 15:24:21 -07:00
isaacs
a26f7d753d Make require() from the repl be relative to cwd 2010-05-29 12:35:30 -07:00
isaacs
82813f2f8c Execute repl code in new context 2010-05-29 12:33:55 -07:00
Ryan Dahl
e97a481785 Destroy REPL pipes instead of shutting down. 2010-05-24 17:14:13 -07:00
Matt Ranney
39464b498f Add docs for new REPL options and fill out description of commands. 2010-04-15 18:03:56 -07:00
Matt Ranney
b7441040f8 REPL can be run from multiple different streams.
e.g. from UNIX sockets with socat.
2010-04-12 00:31:51 -07:00
isaacs
57fbb627ca trailing whitespace fixes 2010-04-11 14:48:23 -07:00
isaacs
de9778b5bd Add line breaks to the code when the user types a line break 2010-04-08 08:12:30 -07:00
Ryan Dahl
fdf46a65c9 Use streams for stdout and stdin 2010-03-15 15:11:40 -07:00
elliottcable
52f088b966 Providing the option for a repl-printer other than sys.p 2010-01-05 00:14:03 -08:00
visionmedia
a650138ebf Moved help msg to node-repl 2010-01-04 22:06:18 -08:00
Ryan Dahl
7a2e784ad7 Module refactor - almost CommonJS compatible now
API change summary:

  * require("/sys.js") becomes require("sys")

  * require("circle.js") becomes require("./circle")

  * process.path.join() becomes require("path").join()
2009-10-31 19:10:30 +01:00
Ryan Dahl
ad0a4cefb8 Namespace EVERYTHING under process; introduce GLOBAL
http://groups.google.com/group/nodejs/browse_thread/thread/1034fd2ad2cd93e8
2009-10-29 23:36:41 +01:00
Ryan Dahl
2b8ab7e24f utils.js links to sys.js instead of other way around 2009-10-13 19:55:28 +02:00
Ryan Dahl
27738d8e60 Clean up some things in the repl, add docs. 2009-09-28 18:48:19 +02:00
Ryan Dahl
c27d9f986a include utils in the repl. 2009-09-28 18:48:18 +02:00
Ryan Dahl
7abad8b7b3 API: Move node.puts(), node.exec() and others to /utils.js 2009-09-28 12:06:30 +02:00
Ryan Dahl
4f69871c17 Add node.inspect() and deprecate p(). 2009-09-27 12:33:44 +02:00
RayMorgan
028e24c9f5 When printing, check to see if value is undefined. If so, print nothing. 2009-09-24 22:16:07 -07:00
RayMorgan
7674bd5004 Added _ that is te result of the previous command. 2009-09-24 19:53:11 -07:00
RayMorgan
6915188a46 Enhanced the repl library.
Now supports:
- command options: .help, .break, .clear, .exit
- local vars and global functions
- ability to print 0, false and ""
- when value is a function, prints [Function]
- when object is circular, prints [Circular Object] instead of throwing an error
2009-09-24 18:56:37 -07:00
Ryan Dahl
ffded5ac86 Extract the good parts of node-repl into standalone library.
Now you can require("/repl.js") in your server to be able to examine it
while it's running.
2009-09-24 00:56:24 +02:00