From 4e554e2dd029470887fb6d527996ee8574eb4528 Mon Sep 17 00:00:00 2001 From: chzyer <0@0xdf.com> Date: Sun, 13 Mar 2016 23:15:38 +0800 Subject: [PATCH] fix remote --- readline.go | 4 ++++ remote.go | 1 + 2 files changed, 5 insertions(+) diff --git a/readline.go b/readline.go index a814cf4..618a334 100644 --- a/readline.go +++ b/readline.go @@ -212,6 +212,10 @@ func (i *Instance) Close() error { return nil } +func (i *Instance) Write(b []byte) (int, error) { + return i.Stdout().Write(b) +} + func (i *Instance) SetConfig(cfg *Config) *Config { if i.Config == cfg { return cfg diff --git a/remote.go b/remote.go index 6685ce0..d20c037 100644 --- a/remote.go +++ b/remote.go @@ -354,6 +354,7 @@ func (r *RemoteCli) Serve() error { } } }() + defer r.raw.Exit() r.readLoop() return nil }