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

autocomplete REPL #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shivankar-p
Copy link
Contributor

Related Issue

Closes: #[issue number that will be closed through this PR]

Describe the changes you've made

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

Screenshots

Original Updated
original screenshot Screenshot from 2022-03-14 00-13-33

@sonarcloud
Copy link

sonarcloud bot commented Mar 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@GouravSardana
Copy link
Member

Great work @shivankar-p . Appreciate it, but i have few concerns which will affect us in future:
If we do autocomplete with this, problem is this is running a python file right? When you try to use the autocomplete, if you see it stuck at “>>> type you thing” , they can’t leverage terminal. One limitation is user can’t use the terminal for other purposes then there’ll be no sense for user to use our dynamic CLI. Think of this as an user while implementing. He/she has to exit the dynamic and use the terminal again. It’ll affect our User experience.

If we can avoid this stuck in the terminal then it would be better. If you see the xonsh, it made a custom terminal but didn’t stop us for using the terminal functionality. It’s on top of it. Xonsh+promptkit make it feel better. We are making terminal as a single point where our user can do everything starting from search to testing the API. So, I hope you understand the design which we were suppose to implement.

As of now don’t close the PR. I’ll review it in my local to see any improvement and will make a call. Meanwhile, if you can explore, can we achieve this thing by REPL?

@shivankar-p
Copy link
Contributor Author

Great work @shivankar-p . Appreciate it, but i have few concerns which will affect us in future: If we do autocomplete with this, problem is this is running a python file right? When you try to use the autocomplete, if you see it stuck at “>>> type you thing” , they can’t leverage terminal. One limitation is user can’t use the terminal for other purposes then there’ll be no sense for user to use our dynamic CLI. Think of this as an user while implementing. He/she has to exit the dynamic and use the terminal again. It’ll affect our User experience.

If we can avoid this stuck in the terminal then it would be better. If you see the xonsh, it made a custom terminal but didn’t stop us for using the terminal functionality. It’s on top of it. Xonsh+promptkit make it feel better. We are making terminal as a single point where our user can do everything starting from search to testing the API. So, I hope you understand the design which we were suppose to implement.

As of now don’t close the PR. I’ll review it in my local to see any improvement and will make a call. Meanwhile, if you can explore, can we achieve this thing by REPL?

This is what I meant by REPL(read evaluate print loop). Basically running an infinite loop and taking inputs unless user wants to exit. Something similar to python3 REPL which we get by entering python3 command in the linux terminal.

@lainq
Copy link
Contributor

lainq commented Mar 14, 2022

Great work @shivankar-p . Appreciate it, but i have few concerns which will affect us in future: If we do autocomplete with this, problem is this is running a python file right? When you try to use the autocomplete, if you see it stuck at “>>> type you thing” , they can’t leverage terminal. One limitation is user can’t use the terminal for other purposes then there’ll be no sense for user to use our dynamic CLI. Think of this as an user while implementing. He/she has to exit the dynamic and use the terminal again. It’ll affect our User experience.

If we can avoid this stuck in the terminal then it would be better. If you see the xonsh, it made a custom terminal but didn’t stop us for using the terminal functionality. It’s on top of it. Xonsh+promptkit make it feel better. We are making terminal as a single point where our user can do everything starting from search to testing the API. So, I hope you understand the design which we were suppose to implement.

As of now don’t close the PR. I’ll review it in my local to see any improvement and will make a call. Meanwhile, if you can explore, can we achieve this thing by REPL?

I thought about this and I think a REPL is the only solution in which we can implement autocomplete. Because, we have control only over the repl, the other auto completion is controlled by the shell.

@GouravSardana
Copy link
Member

No, REPL is not the only solution. If you see gitsome, those guys were using xonsh as a primary terminal for the customisation and did autocomplete as well.

Try installing gitsome and you can see the difference

@lainq
Copy link
Contributor

lainq commented Mar 14, 2022

No, REPL is not the only solution. If you see gitsome, those guys were using xonsh as a primary terminal for the customisation and did autocomplete as well.

Try installing gitsome and you can see the difference

Oh, let me take a look

@GouravSardana
Copy link
Member

cc @shivankar-p

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

Successfully merging this pull request may close these issues.

3 participants