-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add autosuggestion to cli #11671
Add autosuggestion to cli #11671
Conversation
cd6788b
to
414fba9
Compare
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.
Looks useful. Can we document the key binding in cli.rst
?
@ebyhr sure. I will add the documentation as well. Should I do that in different PR? |
@aakashnand You can include the document in this PR. |
Understood will do it soon |
414fba9
to
59fd8ab
Compare
@ebyhr Added documentation in |
Please remove this X and place it on the next entry, "Sufficient doc..." This feature could also use a release note to say that the feature is available as of release whatever. It won't take much: "The Trino CLI now autocompletes commands based on the history of commands already entered." I would also like to see an option to disable this feature in case an individual user finds it distracting or confusing or just hates it. |
@@ -160,6 +160,14 @@ press :kbd:`Enter`. | |||
By default, you can locate the Trino history file in ``~/.trino_history``. | |||
Use the ``TRINO_HISTORY_FILE`` environment variable to change the default. | |||
|
|||
Autosuggestion | |||
-------------- | |||
As you type commands in CLI , you will see a completion offered after the cursor |
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.
... in the CLI, you see offered a suggested completion in muted gray ...
[no future tense in docs]
@Ordinant thank you for comments. I will work on them. For disabling autosuggestion what do you think about adding one more CLI option like --disable-autosuggestion? |
Once this feature gets into the field and people like it, I would love to see the analogous feature added to upstream editors. |
@aakashnand, yes, we don't have properties here for the CLI (although that's not a bad future idea). So the option you suggest looks fine to me. |
9df295f
to
ad3d8a6
Compare
@Ordinant I added the option you suggested. Now user can disable the autosuggestion using
|
68d3357
to
9cd4c6b
Compare
4a78458
to
9f0e5d0
Compare
@ebyhr any idea why 1 check is failing? |
@aakashnand It comes form lack of 377 docker image. You can ignore the failure. Related Slack post https://trinodb.slack.com/archives/CFP480UKX/p1649927228980439?thread_ts=1649910849.504189&cid=CFP480UKX |
1c180e6
to
104718d
Compare
@electrum I have rebased this again, any idea when can we merge this? |
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.
Could you rebase on upstream to resolve a conflict?
104718d
to
b2241bd
Compare
@ebyhr Please do the final review one last time 🙏🏼 . Hope this gets merged soon Waited for too long time |
b2241bd
to
6801134
Compare
@@ -428,6 +430,14 @@ mode: | |||
|
|||
.. _cli-output-format: |
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.
This needs to be with the outputformats header @colebow will take care of this
@@ -428,6 +430,14 @@ mode: | |||
|
|||
.. _cli-output-format: | |||
|
|||
Auto suggestion | |||
--------------- | |||
As you type commands in the CLI , you see offered a suggestion after the cursor |
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.
Empty line after title
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.
@colebow will send PR with fixes
We are still updating wording for that and need that confirmed. And @colebow will also send a PR to update the docs some more. |
Description
Added autosuggestion to trino cli.
new feature
client library
N/A
Related issues pull requests and links
NA
Documentation
() No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries are required.
(x) Release notes entries required with the following suggested text: