cmd/ethereum: new JS repl with cross-platform line editing

This commit is contained in:
Felix Lange
2015-03-06 03:38:19 +01:00
parent bae7e93a9c
commit 38f6d60e6e
7 changed files with 209 additions and 538 deletions

View File

@ -28,7 +28,6 @@ import (
"time"
"github.com/codegangsta/cli"
"github.com/ethereum/go-ethereum/cmd/ethereum/repl"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth"
@ -145,9 +144,9 @@ func runjs(ctx *cli.Context) {
eth := utils.GetEthereum(ClientIdentifier, Version, ctx)
startEth(ctx, eth)
if len(ctx.Args()) == 0 {
repl := ethrepl.NewJSRepl(eth)
repl.Start()
repl := newREPL(eth)
utils.RegisterInterrupt(func(os.Signal) { repl.Stop() })
repl.Start()
eth.WaitForShutdown()
} else if len(ctx.Args()) == 1 {
execJsFile(eth, ctx.Args()[0])