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

Cli: Added minimal command autocomplete #8918

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

jankoerner
Copy link

Implementation of a command autocomplete implemented with linenoise-ng as mentioned in issue #4676.
The autocompletion only starts if at least one character is entered, as far as I understand this is how linenoise works.
The readline dependecy was removed.
In addition to this I removed some warnings which I received when I ran the automatic cli tests.

Fixes #4676

Screenshots

2022-12-24T00:39:10,344770067+01:00

Testing strategy

I tested the autocompletion manually in the terminal.
Currently I try some automatic testing but unfortunately I am not able to get the autocomplete within the tests I wrote.
I think this is due to linenoise because it controls stdin and stdout.

Type of change

  • ✅ New feature (change that adds functionality)
  • ✅ Documentation (non-code change)

@codecov-commenter
Copy link

codecov-commenter commented Dec 24, 2022

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a472ef8) 64.69% compared to head (c942388) 64.41%.

❗ Current head c942388 differs from pull request most recent head a9b717a. Consider uploading reports for the commit a9b717a to get more accurate results

Files Patch % Lines
src/cli/Command.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8918      +/-   ##
===========================================
- Coverage    64.69%   64.41%   -0.28%     
===========================================
  Files          339      341       +2     
  Lines        41462    44259    +2797     
===========================================
+ Hits         26822    28506    +1684     
- Misses       14640    15753    +1113     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@droidmonkey
Copy link
Member

Outstanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add command autocompletion to the interactive CLI
3 participants