Command line terminal interactive display method, device, computer readable medium and equipment
By creating an interface display of file resources, terminal display windows and code files in the IDE, the problem of inconvenient display of remote server resources in the existing technology is solved, an efficient development environment is achieved, and development convenience and efficiency are improved.
Patent Information
- Application Number
- CN202110839291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-07-23
AI Technical Summary
Existing IDE-based development plug-ins cannot display remote server resources in an interface, resulting in low development convenience and efficiency.
By creating an interface display of file resources, terminal display windows and code files corresponding to the server in the user interface, it responds to user operations to control terminal display and code updates, provides file tree display and function menus, and implements interface display of remote server resources. Interaction.
It improves development convenience and efficiency, lowers the operating threshold, and provides developers with an interface development environment.
Smart Images

Figure CN113535037B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of interface interaction technology, and in particular to a command line terminal interactive display method, a command line terminal interactive display device, a computer-readable medium, and an electronic device. Background Art
[0002] An Integrated Development Environment (IDE) is an application used to provide a program development environment. It generally includes tools such as a code editor, compiler, debugger, and graphical user interface, and integrates code writing, analysis, compilation, and debugging functions.
[0003] Existing IDE-based development plug-ins can generally achieve control over remote server resources. The specific implementation methods include: starting the corresponding service process on the remote server and developing functions through the IDE image; or using specific protocols to interact with remote server resources and developing functions through operations on the command line emulation terminal. However, the above methods cannot display development resources in an interface, and displaying development resources in an interface can usually improve development convenience. Therefore, how to provide developers with interface development conditions to improve development efficiency and development convenience has become an urgent problem to be solved.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a command line terminal interactive display method, a command line terminal interactive display device, a computer-readable medium and an electronic device, which can improve development convenience and thus improve development efficiency.
[0006] A first aspect of an embodiment of the present disclosure provides a command line terminal interactive display method, including:
[0007] In response to the first user operation, establishing a connection with the server;
[0008] Display the file resources corresponding to the server in the file display area of the user interface, and create a terminal display window corresponding to the server in the command line display area of the user interface;
[0009] In response to a second user operation acting on a target file in the file resource, the terminal display window is controlled to display a command line terminal corresponding to the target file;
[0010] In response to a third user operation acting on a target command line in the command line terminal, a code file corresponding to the target command line is displayed in a code display area of the user interface.
[0011] In an exemplary embodiment of the present disclosure, displaying file resources corresponding to a server in a file display area of a user interface includes:
[0012] The file resources corresponding to the server are displayed in the file display area in the form of a file tree.
[0013] In an exemplary embodiment of the present disclosure, the command line display area includes at least one terminal display window, and different terminal display windows correspond to different servers;
[0014] The display mode of the command line display area for at least one terminal display window includes any one of the following modes: a mode of displaying a single terminal display window in full screen and a mode of displaying at least one terminal display window at the same time.
[0015] In an exemplary embodiment of the present disclosure, after the control terminal display window displays the command line terminal corresponding to the target file, the method further includes:
[0016] In response to a fourth user operation acting on a target command line in the command line terminal, displaying a function menu corresponding to the target command line in the terminal display window;
[0017] In response to a fifth user operation acting on a target function in the function menu, activation of the target function is triggered.
[0018] In an exemplary embodiment of the present disclosure, after displaying the code file corresponding to the target command line in the code display area of the user interface, the method further includes:
[0019] When a change in the code file stored in the server is detected, the changed code file is downloaded;
[0020] Update the code file displayed in the code display area to the changed code file.
[0021] In an exemplary embodiment of the present disclosure, the method further includes:
[0022] In response to a user operation of shutting down the server, deleting the file resources corresponding to the server displayed in the file display area;
[0023] Close the terminal display window and cancel the display of the code file.
[0024] In an exemplary embodiment of the present disclosure, before responding to the first user operation, the method further includes:
[0025] Display historical connection records and / or hot connection records; wherein the historical connection records and hot connection records include at least one server link.
[0026] According to a second aspect of an embodiment of the present disclosure, a command line terminal interactive display device is provided, the device comprising:
[0027] A connection unit, configured to establish a connection with a server in response to a first user operation;
[0028] A file resource display unit, used to display the file resources corresponding to the server in the file display area of the user interface;
[0029] A command line terminal display unit, used to create a terminal display window corresponding to the server in the command line display area of the user interface, and in response to a second user operation acting on a target file in the file resource, control the terminal display window to display the command line terminal corresponding to the target file;
[0030] The code file display unit is used to respond to a third user operation acting on a target command line in the command line terminal and display a code file corresponding to the target command line in a code display area of the user interface.
[0031] In an exemplary embodiment of the present disclosure, a file resource display unit displays file resources corresponding to a server in a file display area of a user interface, including:
[0032] The file resources corresponding to the server are displayed in the file display area in the form of a file tree.
[0033] In an exemplary embodiment of the present disclosure, the command line display area includes at least one terminal display window, and different terminal display windows correspond to different servers;
[0034] The display mode of the command line display area for at least one terminal display window includes any one of the following modes: a mode of displaying a single terminal display window in full screen and a mode of displaying at least one terminal display window at the same time.
[0035] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0036] a function display unit, configured to display a function menu corresponding to the target command line in the terminal display window in response to a fourth user operation acting on the target command line in the command line terminal after the command line terminal display unit controls the terminal display window to display the command line terminal corresponding to the target file;
[0037] The function starting unit is used to respond to a fifth user operation acting on a target function in the function menu and trigger the starting of the target function.
[0038] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0039] The file changing unit is used to download the changed code file after the code file display unit displays the code file corresponding to the target command line in the code display area of the user interface, when a change of the code file stored in the server is detected; and update the code file displayed in the code display area to the changed code file.
[0040] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0041] The resource deletion unit is used to delete the file resources corresponding to the server displayed in the file display area in response to the user operation of closing the server; close the terminal display window and cancel the display of the code file.
[0042] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0043] The connection record display unit is used to display the historical connection record and / or the hot connection record before the connection unit responds to the first user operation; wherein the historical connection record and the hot connection record include at least one server link.
[0044] According to a third aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the command line terminal interactive display method according to the first aspect of the above embodiment is implemented.
[0045] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the command line terminal interactive display method as in the first aspect of the above embodiment.
[0046] According to a fifth aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0047] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0048] The technical solutions provided in some embodiments of the present disclosure specifically include: establishing a connection with a server in response to a first user operation; displaying file resources corresponding to the server in the file display area of the user interface, and creating a terminal display window corresponding to the server in the command line display area of the user interface; in response to a second user operation acting on a target file in the file resource, controlling the terminal display window to display a command line terminal corresponding to the target file; in response to a third user operation acting on a target command line in the command line terminal, displaying a code file corresponding to the target command line in the code display area of the user interface. By implementing the embodiments of the present disclosure, on the one hand, the convenience of development can be improved based on the interface display of file resources, command line terminals, and code files, thereby improving development efficiency. On the other hand, an interface development environment can be provided for developers in combination with an IDE and a command line simulation terminal to reduce the operational threshold.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0051] Figure 1 A schematic diagram schematically shows an exemplary system architecture of a command line terminal interactive display method and a command line terminal interactive display device to which the embodiments of the present disclosure can be applied;
[0052] Figure 2 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown;
[0053] Figure 3 A flowchart of a command line terminal interactive display method according to an embodiment of the present disclosure is schematically shown;
[0054] Figure 4 A user interface diagram including a file tree and a command line terminal according to an embodiment of the present disclosure is schematically shown;
[0055] Figure 5 A user interface diagram including multiple terminal display windows according to an embodiment of the present disclosure is schematically shown;
[0056] Figure 6 The following schematically shows an interface diagram including a function menu according to an embodiment of the present disclosure;
[0057] Figure 7 A schematic diagram of a function display interface according to an embodiment of the present disclosure is schematically shown;
[0058] Figure 8 A schematic diagram of an interface including a debugging window according to an embodiment of the present disclosure is schematically shown;
[0059] Fig. 9 A schematic diagram of a user interface including a terminal command line and a code file according to an embodiment of the present disclosure is schematically shown;
[0060] Fig.10 A schematic diagram of a user interface for displaying a server connection mode according to an embodiment of the present disclosure is schematically shown;
[0061] Fig.11 A schematic diagram of a user interface of a terminal display window corresponding to each server according to an embodiment of the present disclosure is schematically shown;
[0062] Fig.12 A schematic diagram of a system architecture for implementing a command line terminal interactive display method according to an embodiment of the present disclosure is shown schematically;
[0063] Fig.13 A flowchart of a command line terminal interactive display method according to an embodiment of the present disclosure is schematically shown;
[0064] Fig.14 The structural block diagram of a command line terminal interactive display device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0065] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0066] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0067] Figure 1 The following is a schematic diagram schematically showing an exemplary system architecture of a command line terminal interactive display method and a command line terminal interactive display device to which the embodiments of the present disclosure can be applied.
[0068] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the example are only illustrative. Any number of terminal devices, networks and servers may be provided as required. For example, server 105 may be a server cluster consisting of multiple servers. Server 105 is used to execute: in response to a first user operation, establish a connection with the server; display the file resources corresponding to the server in the file display area of the user interface, and create a terminal display window corresponding to the server in the command line display area of the user interface; in response to a second user operation acting on a target file in the file resource, control the terminal display window to display the command line terminal corresponding to the target file; in response to a third user operation acting on a target command line in the command line terminal, display the code file corresponding to the target command line in the code display area of the user interface.
[0069] Figure 2 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.
[0070] It should be noted that Figure 2 The computer system 200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0071] like Figure 2As shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 202 or the program loaded from the storage part 208 to the random access memory (RAM) 203. In the (RAM) 203, various programs and data required for system operation are also stored. The (CPU) 201, the (ROM) 202 and the (RAM) 203 are connected to each other through a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0072] The following components are connected to the (I / O) interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the (I / O) interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that a computer program read therefrom is installed into the storage section 208 as needed.
[0073] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 209, and / or installed from a removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, various functions defined in the method and apparatus of the present application are executed.
[0074] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0075] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0077] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being installed in the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiment. For example, the electronic device may implement the following method. Figure 3 The various steps shown, etc.
[0078] This example embodiment provides a command line terminal interactive display method. Figure 3 As shown, the command line terminal interactive display method may include the following steps S310 to S340, specifically:
[0079] Step S310: In response to a first user operation, establishing a connection with a server.
[0080] Step S320: Display the file resources corresponding to the server in the file display area of the user interface, and create a terminal display window corresponding to the server in the command line display area of the user interface.
[0081] Step S330: In response to a second user operation on a target file in the file resource, the display window of the control terminal displays a command line terminal corresponding to the target file.
[0082] Step S340: In response to a third user operation acting on a target command line in the command line terminal, a code file corresponding to the target command line is displayed in a code display area of the user interface.
[0083] Implementation Figure 3 The command line terminal interactive display method shown can improve the convenience of development and thus improve development efficiency based on the interface display of file resources, command line terminals, and code files. In addition, the IDE and command line simulation terminal can be combined to provide developers with an interface development environment to reduce the operation threshold.
[0084] Next, the above steps of this exemplary embodiment are described in more detail.
[0085] In step S310, in response to a first user operation, a connection is established with a server.
[0086] The first user operation may be a link input operation, a link selection operation, etc., which is not limited in the present embodiment. The first user operation may be used to select / input multiple server links, based on which, the way to establish a connection with the server is: establish connections with multiple servers respectively.
[0087] Before step S310, the method may further include: modifying and encapsulating the ssh2 library of Node.js so that the modified ssh2 library supports gbk encoding, so that the connection to the server system written in gbk encoding can be realized, thereby improving the application scope of the present application. Furthermore, it may also include: encapsulating the concurrently executed file operation interface (API). Node.js is a JavaScript operating environment based on the Chrome V8 engine.
[0088] In step S320, the file resources corresponding to the server are displayed in the file display area of the user interface, and a terminal display window corresponding to the server is created in the command line display area of the user interface.
[0089] The command line display area includes at least one terminal display window, and different terminal display windows correspond to different servers; wherein the display method of the command line display area for at least one terminal display window includes any one of the following methods: a method of displaying a single terminal display window in full screen and a method of displaying at least one terminal display window at the same time.
[0090] In addition, before displaying the file resources corresponding to the server in the file display area of the user interface, the method may further include: adding multiple enhanced menu trigger functions in Xterm.js so that the developer can directly use the mouse to operate the upload and download of related files in the command line terminal. Xterm.js is a front-end component that allows the application to provide a fully functional terminal for the user in the browser.
[0091] In an exemplary embodiment of the present disclosure, displaying file resources corresponding to the server in a file display area of a user interface includes: displaying the file resources corresponding to the server in the file display area in a file tree manner.
[0092] Among them, the file tree is a form of file display, and the files in the file tree are arranged based on multiple levels. The user can install the software running this application in the form of a plug-in on the corresponding compiler (such as Visual Studio Code (i.e., vscode)), and the file tree can simultaneously display the file resources of the vscode IDE and the file resources corresponding to all servers, so that the user can open the command line terminal of any file according to the needs.
[0093] Please refer to Figure 4 , Figure 4 A user interface diagram including a file tree and a command line terminal according to an embodiment of the present disclosure is schematically shown. A user can install the software running the present application in the form of a plug-in on a corresponding compiler (e.g., Visual Studio Code (i.e., vscode)), and then trigger a connection with a server through a first user operation, so that the following can be displayed: Figure 4 As shown in the user interface, the file resources of the server can be displayed in the file display area of the vscode IDE in the form of a file tree.
[0094] The user can click on any file in the file tree. If the user clicks on file 410, the menu 420 corresponding to the file 410 can be displayed. The menu 420 is used to display functions. The menu 420 may specifically include command windows, file operations, version management, quick retrieval, directory refresh, tool collection and other functions.
[0095] The user can trigger the display of menu 430 corresponding to the target function by clicking on the command window, file operation, version management, quick search, directory refresh, or tool collection. Menu 430 is used to display sub-functions corresponding to the target function, including: current directory, table directory, engine directory, log directory, protocol directory, and file tracking directory.
[0096] Furthermore, the terminal display window 400 can be controlled to display the command line terminal corresponding to the file 410, that is, to display the specific code content corresponding to the file 410. The user can click on the target command line in the specific code content to trigger the display of the menu 440 corresponding to the target command line. The menu 440 is used to display the functions corresponding to the target command line, including: quick view, content paste, file download, file upload, window copy, target jump, window refresh. When the user clicks on any of the functions of quick view, content paste, file download, file upload, window copy, target jump, and window refresh, the code file corresponding to the target command line can be displayed in the code display area of the user interface.
[0097] It can be seen that the implementation of this optional embodiment can facilitate users to open the command line terminal of the corresponding file as needed through the tree display of file resources. By triggering the code file in the command line terminal, the specific code content of the code file can be displayed, thereby facilitating users to edit the corresponding code in the code display area.
[0098] In step S330, in response to a second user operation on a target file in the file resource, the control terminal display window displays a command line terminal corresponding to the target file.
[0099] Optionally, the terminal display window is controlled to display the command line terminal corresponding to the target file, including: the terminal display window is controlled to display the command line terminal corresponding to the target file in full screen to shield other related interfaces in the vscode IDE and provide users with a classic simulation terminal operation experience.
[0100] See also Figure 5 , Figure 5 The following schematically shows a user interface diagram including multiple terminal display windows according to an embodiment of the present disclosure. Figure 5 As shown, multiple terminal display windows can be opened, and different terminal display windows can be used to display command line terminals of different servers. Optionally, when a drag operation is detected, the terminal display window corresponding to the drag operation can be moved to the end position of the drag operation in response to the drag operation, thereby adjusting the display position of the terminal display window, making it convenient for users to adjust the display order of the terminal display windows according to their needs.
[0101] In an exemplary embodiment of the present disclosure, after the control terminal display window displays the command line terminal corresponding to the target file, the above method also includes: responding to a fourth user operation acting on the target command line in the command line terminal, displaying a function menu corresponding to the target command line in the terminal display window; responding to a fifth user operation acting on the target function in the function menu, triggering the start of the target function.
[0102] The target command line may be any command line in the command line terminal. In addition, optionally, if the target function corresponds to a sublist, in response to a fifth user operation, triggering the start of the target function includes: in response to the fifth user operation, outputting a sublist corresponding to the target function, and when a sixth user operation acting on any item in the sublist is detected, responding to the sixth user operation. The sublist corresponding to the target function may include subfunctions and / or file names.
[0103] See also Figure 6 , Figure 6 The following schematically shows an interface diagram including a function menu according to an embodiment of the present disclosure. Figure 6As shown, in response to the fourth user operation acting on the target command line in the command line terminal, a function menu 600 corresponding to the target command line is displayed in the terminal display window, and the function menu 600 may include multiple functions, such as quick view, content paste, file download, file upload, window copy, directory jump, and window refresh. When a fifth user operation acting on the target function 601 in the function menu 600 is detected, a file name menu 610 corresponding to the target function 601 can be displayed in response to the fifth user operation, specifically including: table directory, log directory, data directory, activity directory, script directory, and protocol directory. When a user operation for selecting a file name is detected, the terminal command line of the target file name corresponding to the user operation can be displayed.
[0104] See also Figure 7 , Figure 7 The schematic diagram of the function display interface according to an embodiment of the present disclosure is shown schematically. The present application can also provide the user with a function display method. Figure 7 The method shown, Figure 7 It may include: menu 710, menu 720 and directory 730, where. Menu 710 includes: Go to Definition, Compile Script, Update Script, Work Platform, Quick Find, Debug Related, Quick View, Change All Matches, Cut, Copy, Paste, Git: View FileHistory, Git: View Line History, Command Panel. When the user triggers the work platform in menu 710, menu 720 may be displayed, and menu 720 includes: Current Directory, Open on the Right, Tool Collection, Command Window, Version Management, and Convenient Script. When the user triggers the command window in menu 720, directory 730 may be displayed, and directory 730 includes: Current Directory, Table Directory, Engine Directory, Log Directory, Protocol Directory, and File Tracking.
[0105] See also Figure 8 , Figure 8 The following schematically shows an interface diagram including a debugging window according to an embodiment of the present disclosure. Figure 8 As shown, the present application can also provide a debugging window for the user to facilitate the user to debug the code in the debugging window. In the debugging window, the user can input content through the input area 800, and the input content is used to display the current position of the cursor. The debugging window and the terminal display window can be at the same level, which is convenient for the user to switch freely between the debugging window and the terminal display window.
[0106] It can be seen that the implementation of this optional embodiment can provide users with an interactive interface that can implement code editing and a rich function menu, which is convenient for users to experience the operation interface of the simulation terminal and facilitate users to implement code editing.
[0107] In step S340, in response to a third user operation acting on a target command line in the command line terminal, a code file corresponding to the target command line is displayed in a code display area of the user interface.
[0108] Specifically, the first user operation, the second user operation, the third user operation, the fourth user operation, and the fifth user operation in the present application can be a single-click operation, a double-click operation, a drag operation, a long press operation, a touch screen operation, etc., and the embodiments of the present application are not limited.
[0109] In addition, after detecting a third user operation acting on the target command line in the command line terminal, the above method also includes: displaying a file window corresponding to the target command line, and the files in the file window all correspond to the target command line; if the mouse position / click operation trigger position is detected in the file window, the target code file is determined from the file window according to the mouse position / click operation trigger position.
[0110] Based on this, in response to the third user operation, the code file corresponding to the target command line is displayed in the code display area of the user interface, including: in response to the third user operation, the target code file corresponding to the target command line is displayed in the code display area of the user interface.
[0111] In addition, if the mouse position / click operation trigger position is not detected in the file window, in response to a third user operation, the code file corresponding to the target command line is displayed in the code display area of the user interface, including: in response to a third user operation, all code files corresponding to the target command line are displayed in the code display area of the user interface, so that the user can select the corresponding code file for editing according to needs.
[0112] See also Fig. 9 , Fig. 9 A user interface diagram including a terminal command line and a code file according to an embodiment of the present disclosure is schematically shown. Fig. 9 As shown, when a user operation acting on a target command line 912 in a command line terminal 910 is detected, a function menu 911 corresponding to the target command line 912 may be displayed, and the function menu 911 may include the following functions: quick view, content paste, file download, file upload, window copy, and directory jump. When the user triggers the quick view function, a code file containing code 921 corresponding to the target command line may be displayed in the code display area 920 of the user interface. In addition, it should be noted that file download is used to indicate downloading a specified file or directory, file upload is used to indicate uploading a file under the current terminal directory, window copy is used to indicate opening a specified code file in the user interface of the vscode IDE, and directory jump is used to indicate opening a new window in the vscode IDE and opening a specified code file in the new window.
[0113] In an exemplary embodiment of the present disclosure, after the code file corresponding to the target command line is displayed in the code display area of the user interface, the above method also includes: when a change in the code file stored in the server is detected, downloading the changed code file; and updating the code file displayed in the code display area to the changed code file.
[0114] After the code file displayed in the code display area is updated to a changed code file, the method may further include: outputting prompt information indicating that the code file has been updated.
[0115] It can be seen that by implementing this optional embodiment, the code file can be updated in real time, thereby ensuring that the code file browsed by the user is the latest code file, thereby improving the user's usage experience.
[0116] In an exemplary embodiment of the present disclosure, the method further includes: in response to a user operation of shutting down the server, deleting the file resources corresponding to the server displayed in the file display area; closing the terminal display window and canceling the display of the code file.
[0117] Deleting the file resources corresponding to the server displayed in the file display area includes: deleting the file tree nodes related to the file resources corresponding to the server in the file display area.
[0118] It can be seen that the implementation of this optional embodiment can avoid invalid occupation of the user interface by the file tree used to display file resources by closing the file resources in the server deletion response, thereby improving the user experience.
[0119] In an exemplary embodiment of the present disclosure, before responding to the first user operation, the method further includes: displaying historical connection records and / or hot connection records; wherein the historical connection records and the hot connection records include at least one server link.
[0120] The number of the historical connection records and the hot connection records can be one or more, which is not limited in the embodiment of the present application. A historical connection record can contain one or more server links.
[0121] It can be seen that the implementation of this optional embodiment can achieve connection with multiple servers, thereby facilitating users to remotely operate multiple servers.
[0122] See also Fig.10 , Fig.10 The following schematically shows a user interface diagram for displaying a server connection mode according to an embodiment of the present disclosure. Fig.10As shown, the user can input at least one server name / server branch / server number to be connected through the server name / server branch / server number input window 1000. During the input process, relevant options can be matched for the user according to the detected content in the input window 1000. As the content input by the user increases, the relevant options can also be updated in real time. In this way, the user can input only a part of the server name / server branch / server number, and then select the required server from the matched relevant options, thereby achieving connection with one or more servers. When a user operation acting on the "Working Platform" in the function menu is detected, the corresponding "Working Platform" can be opened. Fig.10 When the user triggers Fig.10 When you click the old connection control in the image, you can display historical connection records and / or popular connection records for users.
[0123] See also Fig.11 , Fig.11 The following schematically shows a user interface diagram of a terminal display window corresponding to each server according to an embodiment of the present disclosure. Fig.11 As shown, when a trigger operation acting on a line of code in a code file is detected, a directory 1110 corresponding to the line of code can be displayed, wherein the directory 1110 can be in a new window and displayed in parallel with the code file with identifier 1100 of 192.168.10.177.
[0124] See also Fig.12 , Fig.12 The following schematically shows a system architecture diagram for implementing a command line terminal interactive display method according to an embodiment of the present disclosure. Fig.12As shown, the system for implementing the command line terminal interactive display method may include a local device 1200, a remote device 1210, and a remote device 1220. Among them, the file system 1211 in the remote device 1210 is based on FreeBSD, which is a UNIX-like operating system. The file system 1221 in the remote device 1220 is based on Linux, which is a UNIX-like operating system. The present application can be installed and run in the vscode IDE environment 1210 of the local device in a plug-in manner without the need for an additional backend service process. Among them, the vscode IDE environment 1210 can be used to display the command line terminal 1211, the vscode IDE environment 1210 can also be used to run the file tree system 1212, and the vscode IDE environment 1210 can also support various file operations and other encapsulations 1213. In addition, the local device 1200 and the remote device 1210 can communicate based on the ssh or ssh2 protocol, wherein ssh is a secure shell protocol, and ssh and ssh2 are different versions of secure shell protocols. The local device 1200 and the remote device 1220 can communicate based on the remoteSSH plug-in. Based on the above system, the same functions as the development kit and the command line emulation terminal with richer functions can be realized and the FreeBSD system can be supported.
[0125] See also Fig.13 , Fig.13 The following schematically shows a flow chart of a command line terminal interactive display method according to an embodiment of the present disclosure. Fig.13 As shown, the command line terminal interactive display method may include the following steps.
[0126] Step S1300: displaying historical connection records and / or hot connection records; wherein the historical connection records and hot connection records include at least one server link.
[0127] Step S1310: In response to a first user operation, establishing a connection with a server.
[0128] Step S1320: Display the file resources corresponding to the server in the file display area in the form of a file tree, and create a terminal display window corresponding to the server in the command line display area of the user interface.
[0129] Step S1330: In response to a second user operation on a target file in the file resource, the control terminal display window displays a command line terminal corresponding to the target file.
[0130] Step S1340: In response to a third user operation acting on a target command line in the command line terminal, a code file corresponding to the target command line is displayed in a code display area of the user interface.
[0131] Step S1350: In response to a fourth user operation acting on a target command line in the command line terminal, a function menu corresponding to the target command line is displayed in the terminal display window.
[0132] Step S1360: In response to a fifth user operation on a target function in the function menu, triggering activation of the target function.
[0133] Step S1370: When a change in the code file stored in the server is detected, the changed code file is downloaded, and the code file displayed in the code display area is updated to the changed code file.
[0134] Step S1380: In response to the user operation of shutting down the server, the file resources corresponding to the server displayed in the file display area are deleted, the terminal display window is closed, and the display of the code file is canceled.
[0135] It should be noted that steps S1300 to S1380 are Figure 3 The steps and their embodiments shown correspond to each other. For the specific implementation of steps S1300 to S1380, please refer to Figure 3 The steps and embodiments shown are not described in detail here.
[0136] It can be seen that the implementation Fig.13 The command line terminal interactive display method shown can improve the convenience of development and thus improve development efficiency based on the interface display of file resources, command line terminals, and code files. In addition, the IDE and command line simulation terminal can be combined to provide developers with an interface development environment to reduce the operation threshold.
[0137] Furthermore, in this example implementation, a command line terminal interactive display device is also provided, referring to Fig.14 As shown, the command line terminal interactive display device 1400 may include:
[0138] The connection unit 1401 is used to establish a connection with the server in response to a first user operation;
[0139] The file resource display unit 1402 is used to display the file resources corresponding to the server in the file display area of the user interface;
[0140] The command line terminal display unit 1403 is used to create a terminal display window corresponding to the server in the command line display area of the user interface, and in response to a second user operation acting on a target file in the file resource, control the terminal display window to display the command line terminal corresponding to the target file;
[0141] The code file display unit 1404 is used to respond to a third user operation acting on a target command line in the command line terminal and display a code file corresponding to the target command line in the code display area of the user interface.
[0142] The command line display area includes at least one terminal display window, and different terminal display windows correspond to different servers; wherein the display method of the command line display area for at least one terminal display window includes any one of the following methods: a method of displaying a single terminal display window in full screen and a method of displaying at least one terminal display window at the same time.
[0143] It can be seen that the implementation Fig.10 The device shown can improve the convenience of development and thus the efficiency of development based on the interface display of file resources, command line terminals, and code files. In addition, an interface development environment can be provided for developers in combination with an IDE and a command line simulation terminal to reduce the operation threshold.
[0144] In an exemplary embodiment of the present disclosure, the file resource display unit 1402 displays the file resources corresponding to the server in the file display area of the user interface, including:
[0145] The file resources corresponding to the server are displayed in the file display area in the form of a file tree.
[0146] It can be seen that the implementation of this optional embodiment can facilitate users to open the command line terminal of the corresponding file as needed through the tree display of file resources. By triggering the code file in the command line terminal, the specific code content of the code file can be displayed, thereby facilitating users to edit the corresponding code in the code display area.
[0147] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0148] a function display unit (not shown) configured to display a function menu corresponding to the target command line in the terminal display window in response to a fourth user operation acting on the target command line in the command line terminal after the command line terminal display unit 1403 controls the terminal display window to display the command line terminal corresponding to the target file;
[0149] The function activation unit (not shown) is used to respond to a fifth user operation acting on a target function in the function menu and trigger activation of the target function.
[0150] It can be seen that the implementation of this optional embodiment can provide users with an interactive interface that can implement code editing and a rich function menu, which is convenient for users to experience the operation interface of the simulation terminal and facilitate users to implement code editing.
[0151] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0152] The file change unit (not shown) is used to download the changed code file after the code file display unit 1404 displays the code file corresponding to the target command line in the code display area of the user interface, when a change in the code file stored in the server is detected; and update the code file displayed in the code display area to the changed code file.
[0153] It can be seen that by implementing this optional embodiment, the code file can be updated in real time, thereby ensuring that the code file browsed by the user is the latest code file, thereby improving the user's usage experience.
[0154] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0155] The resource deletion unit (not shown) is used to delete the file resources corresponding to the server displayed in the file display area in response to the user operation of shutting down the server; close the terminal display window and cancel the display of the code file.
[0156] It can be seen that the implementation of this optional embodiment can avoid invalid occupation of the user interface by the file tree used to display file resources by closing the file resources in the server deletion response, thereby improving the user experience.
[0157] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0158] The connection record display unit (not shown) is used to display the historical connection record and / or the hot connection record before the connection unit 1401 responds to the first user operation; wherein the historical connection record and the hot connection record include at least one server link.
[0159] It can be seen that the implementation of this optional embodiment can achieve connection with multiple servers, thereby facilitating users to remotely operate multiple servers.
[0160] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0161] Since the various functional modules of the command line terminal interactive display device of the example embodiment of the present disclosure correspond to the steps of the example embodiment of the command line terminal interactive display method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the command line terminal interactive display method described above in the present disclosure.
[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A command line terminal interactive display method, characterized in that: include: In response to the first user operation, establishing a connection with the server; Display the file resources corresponding to the server in the file display area of the user interface, and create a terminal display window corresponding to the server in the command line display area of the user interface; In response to a second user operation acting on a target file in the file resource, controlling the terminal display window to display a command line terminal corresponding to the target file; In response to a third user operation acting on a target command line in the command line terminal, displaying a code file corresponding to the target command line in the code display area of the user interface; Among them, it also includes: Open multiple terminal display windows. Different terminal display windows are used to display command line terminals of different servers. In response to the drag operation, moving the terminal display window corresponding to the drag operation to the end position of the drag operation to adjust the display position of the terminal display window corresponding to the drag operation; After controlling the terminal display window to display the command line terminal corresponding to the target file, the method further includes: In response to a fourth user operation acting on a target command line in the command line terminal, a function menu corresponding to the target command line is displayed in the terminal display window; wherein the function menu includes quick view, content paste, file download, file upload, window copy, directory jump, and window refresh; In response to a fifth user operation on a target function in the function menu, a file name menu corresponding to the target function is displayed; wherein the file name menu includes a table directory, a log directory, a data directory, an activity directory, a script directory, and a protocol directory; When a user operation for selecting a file name is detected, a terminal command line of a target file name corresponding to the user operation is displayed.
2. The method according to claim 1, characterized in that Displaying the file resources corresponding to the server in the file display area of the user interface includes: The file resources corresponding to the server are displayed in the file display area in the form of a file tree.
3. The method according to claim 1, characterized in that The command line display area includes at least one terminal display window, and different terminal display windows correspond to different servers; The command line display area displays the at least one terminal display window in any one of the following ways: a way of displaying a single terminal display window in full screen and a way of displaying the at least one terminal display window at the same time.
4. The method according to claim 1, characterized in that After displaying the code file corresponding to the target command line in the code display area of the user interface, the method further includes: When a change is detected in the code file stored in the server, downloading the changed code file; The code file displayed in the code display area is updated to the changed code file.
5. The method according to claim 1, characterized in that The method further comprises: In response to a user operation of shutting down the server, deleting the file resources corresponding to the server displayed in the file display area; Close the terminal display window and cancel the display of the code file.
6. The method according to claim 1, characterized in that Before responding to the first user operation, the method further includes: Display historical connection records and / or hot connection records; wherein the historical connection records and the hot connection records include at least one server link.
7. A terminal interface simulation device, characterized in that: include: A connection unit, configured to establish a connection with a server in response to a first user operation; A file resource display unit, used to display the file resources corresponding to the server in the file display area of the user interface; A command line terminal display unit, configured to create a terminal display window corresponding to the server in the command line display area of the user interface, and in response to a second user operation acting on a target file in the file resource, control the terminal display window to display a command line terminal corresponding to the target file; A code file display unit, configured to respond to a third user operation acting on a target command line in the command line terminal and display a code file corresponding to the target command line in the code display area of the user interface; Wherein, the device is also used for: Open multiple terminal display windows. Different terminal display windows are used to display command line terminals of different servers. In response to the drag operation, moving the terminal display window corresponding to the drag operation to the end position of the drag operation to adjust the display position of the terminal display window corresponding to the drag operation; Wherein, the device further comprises: a function display unit, configured to display a function menu corresponding to the target command line in the terminal display window in response to a fourth user operation acting on the target command line in the command line terminal after the command line terminal display unit controls the terminal display window to display the command line terminal corresponding to the target file; wherein the function menu includes quick view, content paste, file download, file upload, window copy, directory jump, and window refresh; A function startup unit is used to respond to a fifth user operation acting on a target function in the function menu, and display a file name menu corresponding to the target function; wherein the file name menu includes a table directory, a log directory, a data directory, an activity directory, a script directory, and a protocol directory; when a user operation for selecting a file name is detected, a terminal command line of the target file name corresponding to the user operation is displayed.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the command line terminal interactive display method according to any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the command line terminal interactive display method according to any one of claims 1 to 6.
