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

[AMA] Auto Completion #773

Open
kingToolbox opened this issue May 19, 2022 · 23 comments
Open

[AMA] Auto Completion #773

kingToolbox opened this issue May 19, 2022 · 23 comments
Labels
feature New feature

Comments

@kingToolbox
Copy link
Owner

kingToolbox commented May 19, 2022

I'm happy to answer any questions and really look forward to getting any feedback and ideas from you!

Auto completion is one of the most important features of WindTerm. I plan to complete the entire feature development in three development cycles of v2.5, v2.6 and v2.7. Auto completion includes but are not limited to:

  • Auto-complete command name, command options and command parameters.
  • Auto-complete command histories.
  • Auto-complete user-defined command snippets.
  • Better auto-completion based on context and history.
  • Better auto-completion based on file system and system environment.

I have written nearly 4,000 command configuration files, but this is obviously not enough. After the design is finalized, I look forward to more people participating in the writing work. All command configurations, including the 4000 commands I have written, will be released under the Creative Commons Attribution 4.0 International Public License. Not only WindTerm can use these commands, any terminal can use them too.

The WindTerm_2.5.0_Prerelease_1 just released contains some auto-completion features. Welcome to experience it. Thank you.

@kingToolbox kingToolbox pinned this issue May 19, 2022
@kingToolbox kingToolbox added the feature New feature label May 19, 2022
@luantu
Copy link

luantu commented May 19, 2022

how to enable this feature ?

@kingToolbox
Copy link
Owner Author

Just download WindTerm_2.5.0_Prerelease_1 and type 😄 you can watch this intro video to learn more.

@luantu
Copy link

luantu commented May 19, 2022

I just replace with the version 2.5.0 .but nothing happened
running on windows 10, and ssh to my ubuntu 18.04

video.3.mp4

@luantu
Copy link

luantu commented May 19, 2022

I just found that it works in another telnet session , but did not work in ssh session mentioned above. >_<

image

@eugenov
Copy link

eugenov commented May 19, 2022

@kingToolbox and how to disable it? Or is any way to tinker it?

@luantu
Copy link

luantu commented May 19, 2022

it works when i inserting a # before comman....hahaha
image

@kingToolbox
Copy link
Owner Author

@luantu
Since the text in WindTerm does not have any rules and grammatical constraints, it is indeed very difficult to process the text. The current design relies heavily on the command prompt. So once you use tools such as zsh, you will not be able to use the auto completion because WindTerm cannot find the command prompt. And there is no way to find a good solution for this. 😞

@kingToolbox
Copy link
Owner Author

@eugenov
I'm usually used to testing new features in Prerelease versions. So there is currently no option to disable it. But I will provide such an option in the official version. I will also try my best to make auto completion perfect enough so that you won't think about closing it. 😄

@shengkui
Copy link

It's boring sometimes, waiting a disable option.

@kingToolbox
Copy link
Owner Author

Yes, I've thought about it after @eugenov asked this question. In the next prerelease version, auto completion will only be available for configured commands. This can reduce unnecessary interference very well. After all, there are not enough command configurations that have been completed.

Tips:
If you enter a command, such as vi, and there is no matching command in the autocomplete list. You don't need to press the esc key to cancel the autocomplete list, you can directly continue to enter a space to automatically close the list.

@eugenov
Copy link

eugenov commented May 20, 2022

Typing "ll"-"enter" in directory which files you want to list ends up with "kill". It is one of usual and very quick-typing commands, so I have no time to think about it. I think commands without options need to be polished. :)

@kingToolbox
Copy link
Owner Author

@eugenov
Creating an empty file ll.command or ls,ll.command in the WindTerm_install_path/terminal/commands/linux can temporarily circumvent your problem.

This is the first prerelease version after all, so there will indeed be a lot of shortcomings. But in the next prerelease version, I will add some required settings, as well as a better auto completion, including better support for commands without parameters, in order to meet the needs of daily use.

An unhelpful autocomplete is not a good autocomplete I want. 😄

@eugenov
Copy link

eugenov commented May 20, 2022

Oh, I see that I can write autocomplete commands by myself? It is a great news!
Can I create user commands and lexers in profile directory? Looking forward updates and features, thanks for your hard work!

@kingToolbox
Copy link
Owner Author

Yes, commands are fully customizable. There are so many commands, if I need to write configuration for each, I don't think I have time to eat and sleep. 😅

Unfortunately, like other features, such as keymaps, themes, etc., it is not yet possible to support users to write their own configuration files in the ./wind/profiles folder. This is because many designs are still in flux. If I change the design and then a lot of users need to rewrite or modify their config files, That would be a disaster for me. I expect customization will be available starting from the 2.8 version. And I will provide all customizations before the 3.0 version, and fix all known bugs in issues as much as possible.

Starting from version 3.0, a plugin system and a plugin download platform will be developed, which will bring a better future to WindTerm.

@eugenov
Copy link

eugenov commented May 20, 2022

There are so many commands, if I need to write configuration for each, I don't think I have time to eat and sleep.

imao users need only basic commands where autocomplete realy helps, the rest we could write by ourselves. Just give us a manual and a easy way to customize them. So let's save a lot of time for important things :)

@iciness
Copy link

iciness commented May 24, 2022

How to disable auto completion?

@eugenov
Copy link

eugenov commented May 24, 2022

How to disable auto completion?

Right now you can only delete all subfolders in terminal/commands folder

@zdltvxq
Copy link

zdltvxq commented May 25, 2022

@eugenov I'm usually used to testing new features in Prerelease versions. So there is currently no option to disable it. But I will provide such an option in the official version. I will also try my best to make auto completion perfect enough so that you won't think about closing it. 😄

let me show a reason of closing it, when I use it in gramma linux, and type 'll' command, and type enter, it always completes with kill , type space after ll can solve this problem , but I usually type enter after ll. when I choose by choosing none gramma, all color highlight disappeared.
there is another question, I didn't find the option of remembering user name in a ssh session.

@printff
Copy link

printff commented May 25, 2022

Type cd then press enter, and will get chmod.
Using right arrow instead Enter to select auto completion like mariadb client?

@yang-kai-shuo
Copy link

how to empty my history command?

@steinvenic
Copy link

Type cd then press enter, and will get chmod. Using right arrow instead Enter to select auto completion like mariadb client?

Auto Completion also affects my normal full commands too,your suggest sounds good ~
image

@robot-dot-win
Copy link

robot-dot-win commented Jul 13, 2022

2.5.0 Prerelease 3 is great, totally solving all related issues. This subject may be closed.

@kingToolbox
Copy link
Owner Author

Sorry for replying so late, I just got back from a business trip.

@eugenov
I still need time to perfect the format of the file, and it is expected that the customization of commands will be opened in subsequent versions. I look forward to volunteers adding commands such as docker commands, switch/router commands, etc.

@iciness
@zdltvxq
@printff
@steinvenic
In the WindTerm_2.5.0, you can use the setting Menu - Session - Preferences - Settings - Terminal - Auto Completion to configure the auto completion:
image

@yang-kai-shuo
In the WindTerm_2.5.0, you can use the setting Menu - Session - Preferences - Settings - Terminal - Command History to clear the command history:
image

@ImMartinYoung
Thank you, because the autocomplete list item is no longer selected by default, users can type smoothly as before, and the matching algorithm has also been greatly improved to make the matching more accurate, so from the feedback, the current auto completion is not bad. 😄

I will continue to improve it and still welcome any comments and suggestions. Thank you all.

@kingToolbox kingToolbox unpinned this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

10 participants