-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
TGCommandLinePlugin Up-Down Arrows and Tab Keys #7180
Comments
I'll take a look if and how that could easily be implemented
Sorry, but I don't think I will embark in such development in the current GUI.
I'll cross-check, but I think it should already be the case... |
@ferdymercury please check root-project#7180 |
Thanks so much. I checked it, it works great, I saw just a couple of issues:
Thanks for the excellent support. |
I'll check
OK, I'll see what I can do
That might well be. But if it's the case then I'm afraid there is not much I can do.. |
Thanks! For the tab-completion, I checked and it looks it could be done in a more or less simple way I guess (pseudocode):
Note: inspired by TClingTabCompletion::Complete function. |
@ferdymercury I updated the PR. Please check and let me know. Thanks! |
Looks really great, thank you very much. There is only one issue. The history is not being added. I tracked it down to here: The command is about to be added, but the history file name is empty, thus it returns on line 73.
I would suggest that, if SetHistAdd() is called, then it would set the default hist file name in the fContext. Or alternatively, a second parameter in the SetHistAdd function in order to set a custom hist file name. The function to set the hist name is: |
Yes, I know, but since this is quite a high level change, I don't think I will introduce it in the
You can even specify your own history file, if you don't want to use the default. |
Thank you very much Bertrand for the explanation. I tried with this one-liner in my code, and now it works perfectly:
The problem I see if it is not introduced in the plugin is that the SetHistAdd() function has no effect. To avoid confusion, I would suggest to add the following in the documentation:
After that addition, it looks great and ready to merge in my opinion :) |
Right, I agree, I will add those lines in the doc. Thanks! |
…t-project#7220) * Add up and down arrow keys handling (fix root-project#7180) * Improve the command plugin behaviour - Add <tab> completion (thanks @ferdymercury) - Improve the `up` and `down` key handling - Add a temporary string to save the current user input - Update copyright * Document the `SetHistAdd()` method * Doxygen formatting (thanks Olivier)
Explain what you would like to see improved
The TGCommandLinePlugin is great for external CMake/C++ applications that use some ROOT classes / TApplication and GUI classes TGFrame, where you want to have some interactive debugging options via Cling. To make it even more user-friendly, it would be nice if the following things were improved:
Optional: share how it could be improved
Changes in TGTextEntry:
Changes in TGCommandLinePlugin
To Reproduce
Setup
The text was updated successfully, but these errors were encountered: