IndianOpenSourceFoundation / dynamic-cli

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
https://pypi.org/project/dynamic-cli/
GNU General Public License v3.0
169 stars 120 forks source link

Add xonsh shell in dynamic #125

Open GouravSardana opened 2 years ago

GouravSardana commented 2 years ago

We have to make autocomplete feature for dynamic. To make it work we need to create a xonsh shell. Still confused ? Ref to this - xonsh

How does it actually works?

When a user types dynamic. It will redirect to a different shell on the same terminal and we can use autocomplete in that shell because our normal terminal doesn't allow you to autocomplete.

Ref first 1 sec of GIF [When he type gitsome, Another shell got popup [still confused? Tried installing gitsome in local and type gitsome in terminal]]-

endgoal

Credit for xonsh - xonsh Credit for Gitsome - Gitsome

sudojarvis commented 2 years ago

Hi, I would like to work on this issue. Could you please give some head start? It would be helpful.

GouravSardana commented 2 years ago

Go ahead buddy @sudojarvis

sudojarvis commented 2 years ago

@GouravSardana gitsome uses xonsh shell. I have to do a similar thing right?

sudojarvis commented 2 years ago

Do we have to do it from scratch or we can merge it from xonsh.

GouravSardana commented 2 years ago

@sudojarvis That’s correct gitsome uses the xonsh shell. no no, you don’t have to create it from scratch just leverage the xonsh and try to replicate the flow from gitsome

sudojarvis commented 2 years ago

@GouravSardana could you please assign the issue to me under GSSOC'22.

GouravSardana commented 2 years ago

Np. Work on this issue. Don’t worry about assigning the issues. I’ll take care of that

sudojarvis commented 2 years ago

https://user-images.githubusercontent.com/75030755/156933413-3f2940af-45ff-4783-b723-f12a83604233.mp4

@GouravSardana Till now it is auto-completing, what I typed previously. But I have used code from gitsome. Is this fine?

GouravSardana commented 2 years ago

@sudojarvis Is this using XONSH ? I couldn't see this going to the xonsh terminal just like in gitsome.

sudojarvis commented 2 years ago

@sudojarvis Is this using XONSH ? I couldn't see this going to the xonsh terminal just like in git

  • If I type gitsome, It'll open up a new customize terminal where we can do autocomplete
  • Is this autocomplete based on our history or the argument which we have ?

@GouravSardana yes, to 1st two questions. And updated the video watch from 2:35.

sudojarvis commented 2 years ago
  • Is this autocomplete based on our history or the argument which we have ? based on our history
GouravSardana commented 2 years ago

Okay but i think this autocomplete should work based on both things. One is history and other is args. As of now, can you make a PR, I’ll review it locally and will give you suggestions accordingly

GouravSardana commented 2 years ago

@sudojarvis Any update ?