简体   繁体   English

自动完成和历史记录浏览如何在远程Shell(SSH)中工作

[英]How auto-completion and history browsing work in remote shell (SSH)

It's easy to understand how to run a process and get its output through SSH. 很容易理解如何运行进程并通过SSH获取其输出。

How about auto-completion via tab and history browsing? 通过选项卡和历史记录浏览自动完成如何? What is the protocol or interface behind it? 它背后的协议或接口是什么?

It's just a normal terminal interface, nothing special. 它只是一个普通的终端接口,没什么特别的。 You send characters (and control codes) through SSH to the remote server, and it sends characters (and control codes) back to your terminal emulator, which interprets the control codes and displays the characters. 您通过SSH将字符(和控制代码)发送到远程服务器,然后它将字符(和控制代码)发送回终端仿真器,终端仿真器将解释控制代码并显示字符。

For this to work, your terminal needs to be in "raw" mode (ie, it does not echo characters or interpret backspaces and other control codes). 为此,您的终端必须处于“原始”模式(即,它不回显字符或解释退格键和其他控制代码)。 The ssh client program configures your terminal emulator properly before establishing the connection. 建立连接之前,ssh客户端程序会正确配置终端仿真器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM