Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于myssh包里面 如何读取交互终端的操作记录命令 #2

Closed
shencan opened this issue Sep 20, 2020 · 3 comments
Closed

Comments

@shencan
Copy link

shencan commented Sep 20, 2020

你好,我看myssh.go中有个Enter方法 传入w io.Writer, r io.Reader接口就行,然后分别读取终端输入 然后写入到输出.但是r.ListenStdin()和w.Run()之后 登录机器后 不支持tab键和方向键
部分代码如下:

	var w *myssh.MyWriter
	var r *myssh.MyReader
	w = myssh.NewWriter()
	r = myssh.NewReader()

	session.Stdout = w
	session.Stderr = os.Stdin
	session.Stdin = r

        r.ListenStdin()
	w.Run()
@xxjwxc
Copy link
Owner

xxjwxc commented Sep 21, 2020

tab建需要托管。

@shencan
Copy link
Author

shencan commented Sep 23, 2020

请问下怎么托管

@xxjwxc
Copy link
Owner

xxjwxc commented Sep 23, 2020

EnterTerminal()
你试下这个函数

@xxjwxc xxjwxc closed this as completed Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants