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 }