Native ui autocompletion through direct communication with the shell
AssigneeMicrosoft Technology Licensing, LLC
InventorDANIEL JOHN IMMS
Life of this patent
Estimating the term…
Abstract
An autocompletion feature for a command line interface communicates directly with the shell to obtain candidates to complete a partially-formed CLI command. A terminal emulator generates autocompletion request sequences that are intercepted by a custom shell script integrated with the shell. The custom shell script uses its own autocompletion engine and a CLI command repository with the most current and historical versions of the CLI command structure to obtain autocompletion candidates. In this manner, the shell may be hosted in a remote device or in a separate execution environment without impacting the device hosting the terminal emulator for updates to the CLI command structure.
Claims20
A system comprising:
- one or more processors;
- and
- a memory that stores one or more programs configured to be executed by the one or more processors, the one or more programs including instructions to perform acts that:
- establish a direct secure communication link between a terminal emulator and a shell;
- configure the terminal emulator to receive text input from a command line interface (CLI);
- detect, by the terminal emulator, a partially-formed CLI command entered into the CLI;
- generate, by the terminal emulator, an autocompletion request sequence including a first escape sequence and the partially-formed CLI command;
- transmit, by the terminal emulator, through the direct secure communication link, the autocompletion request sequence to the shell;
- receive, by the terminal emulator, an autocompletion response sequence including a second escape sequence and at least one autocompletion candidate;
- and
- display, by the terminal emulator, the at least one autocompletion candidate in the CLI.
The system of claim, wherein the terminal emulator is hosted by a first virtual machine and the shell is hosted in a second virtual machine, wherein the first virtual machine and the second virtual machine differ.
A computer-implemented method, comprising:
- integrating a custom shell script with a shell program of a command line interface (CLI);
- establishing a secure direct communication link between the shell program and a terminal emulator;
- receiving, from the secure direct communication link, an autocompletion request sequence destined to the shell program, the autocompletion request sequence including a first escape sequence and a partially-formed command;
- monitoring, by the custom shell script, communications destined to the shell program;
- intercepting, by the custom shell script, the autocompletion request sequence upon detection of the first escape sequence;
- obtaining, by the custom shell script, at least one candidate to complete the partially-formed command;
- generating, by the custom shell script, an autocompletion response sequence, the autocompletion response sequence including a second escape sequence and the at least one candidate;
- and
- transmitting, by the custom shell script, the autocompletion response sequence to the terminal emulator for display in the CLI.
A computer-implemented method, comprising:
- providing a terminal emulator to receive a command line interface (CLI) command that is interpreted by a shell program;
- configuring a custom shell script integrated with the shell program to recognize an escape sequence included in transmissions sent to the shell program, wherein the shell program ignores transmissions including the escape sequence;
- obtaining, by the custom shell script, an autocompletion request sequence transmitted from the terminal emulator, the autocompletion request sequence including the escape sequence and a request for autocompletion candidates for a partially-formed CLI command;
- accessing, by an autocompletion engine in the shell, a CLI command repository for the autocompletion candidates for the partially-formed CLI command;
- returning, to the terminal emulator, an autocompletion response sequence, wherein the autocompletion response sequence includes the escape sequence and the autocompletion candidates;
- and
- upon the terminal emulator recognizing the escape sequence in the autocompletion response sequence, displaying the autocompletion candidates in the CLI.
Dependencies are inferred from the claim text.