cli: support escape codes
This commit is contained in:
parent
2ee755e09f
commit
f6176b30f2
9 changed files with 94 additions and 47 deletions
|
@ -1,6 +1,9 @@
|
|||
package vm
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/abiosoft/readline"
|
||||
vmcli "github.com/nspcc-dev/neo-go/pkg/vm/cli"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
@ -18,6 +21,9 @@ func NewCommands() []cli.Command {
|
|||
}
|
||||
|
||||
func startVMPrompt(ctx *cli.Context) error {
|
||||
p := vmcli.New()
|
||||
p := vmcli.NewWithConfig(true, os.Exit, &readline.Config{
|
||||
Stdout: ctx.App.Writer,
|
||||
Stderr: ctx.App.ErrWriter,
|
||||
})
|
||||
return p.Run()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue