优化 shell 交互体验,增加 PTY/ConPTY 支持#78
Open
sangnigege wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
说明
之前
shell使用普通管道实现,不是真正的终端环境,在一些交互场景下体验不太好,比如方向键、补全、全屏程序、终端控制字符等支持有限,而且不能滚动。涉及到一些交互式操作时,往往手动升级为交互式shell,比较不便。这个 PR 在保留原有 shell 实现的基础上,增加了一套基于 PTY/ConPTY 的交互式终端通道。支持时默认使用新的交互式 shell;不支持或启动失败时,会回退到原来的 shell 逻辑。
主要改动
legacy_shell,方便在网络较差或兼容性场景下手动使用。兼容性
测试
本地已测试:
go test ./...go vet ./...make alllegacy_shell可正常使用