-
Notifications
You must be signed in to change notification settings - Fork 1.4k
use replxx instead of readline #559
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also change readline to replxx in src/client
src/oblsm/client
I'll try to change tonight, thanks for advice!🌹 |
i have another question, in my environment(centos 7), it seem will build failed. but for ubuntu 24.04, it's ok. do you have any idea?
|
@nautaa I have googled the issue you mentioned. Some says it can be solved by adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use a class LineReader to encapsulate, because it looks like there is too much duplicate code.
thanks for you advice! i will try it later |
Yes! Exactly what I want to do last night. But I'm not sure where to put this class, so I just modified the original Put the class in |
|
@nautaa |
maybe linenoise is better? looks like there are more projects use it.
If you want to introduce replxx continue, you can add a compile option. if someone has problems with replxx, he can turn off the compile option for replxx. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #559 +/- ##
==========================================
+ Coverage 55.18% 55.21% +0.02%
==========================================
Files 178 178
Lines 10338 10338
==========================================
+ Hits 5705 5708 +3
+ Misses 4633 4630 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
key changes
TODOSince infor
|
thanks for your effort, I will convert it to draft for now, you can mark it as ready to review when you're ready. |
So, what I am about to do is:
Due to many courses having just concluded and exams approaching, I’ll be slower to fix bugs. Thank you for all your suggestions and comments. |
thanks, There's no DDL here. just take your time! If you have any difficulties, feel free to get in touch. |
Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot!! It's my pleasure to contribute to |
Wonderful! |
What problem were solved in this pull request?
Issue Number: #558
Problem:
As I mentioned in the issue, students cannot use the arrow keys to browse the command history in the current cli. The existing code seems to want to use
readline
(GNU Readline library), which may conflict with the existing license. So I used replxx to improve this function in the cli.What is changed and how it works?
Key changes:
CMakeLists.txt
inobserver
Basic logic:
CliCommunicator
class utilizes areplxx::Replxx
instance to manage the interaction../.miniob.history
.Other information
observer -P cli
functionality. The obclient is NOT modified.current_time - previous_history_save_time > 5
, history_save.