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

Don't exit on Enter #29

Open
lodenrogue opened this issue Dec 4, 2016 · 9 comments
Open

Don't exit on Enter #29

lodenrogue opened this issue Dec 4, 2016 · 9 comments

Comments

@lodenrogue
Copy link

lodenrogue commented Dec 4, 2016

Can we change the way the program exits when you hit the 'Enter' button? Maybe make the default exit ctrl-C?

Pressing 'Enter' should select the given auto-complete suggestion.

@simeji
Copy link
Owner

simeji commented Dec 5, 2016

@lodenrogue Sorry, I can't imagine your situation. Please explain me that detail?
ex. json, query, your os, etc..

@ashishg-qburst
Copy link
Contributor

In the demo example

  • .users[1] *Tab* - shows you the result
  • .users[1] *Enter* - exits the program

Its confusing when Enter causes a program to terminate.

@lodenrogue
Copy link
Author

What ashishg-qburst said

@fiatjaf
Copy link

fiatjaf commented Dec 6, 2016

What do you think Enter should do when there are no suggestions being chosen?

@stevenschlansker
Copy link

Even doing nothing would be preferable to exiting the program. Enter is too common of a "accept my input" command and I already exited jid three times accidentally this way :)

@LarryLuTW
Copy link

LarryLuTW commented Dec 3, 2018

Is anyone working on this? I can help to do this.

@wwalker
Copy link

wwalker commented Dec 11, 2020

I love jiq. But *ENTER* is my enemy :-(

I often accidentally hit enter (or more often paste something in that has a trailing "enter") and

*BAM*

the thing I almost had working is gone. Sometimes I know enough to recreate it in seconds, other times it was really complex, and I have to start over.

@jnweiger
Copy link

I'd suggest, jid should use q to quit.
Enter is used to select an element from the tab completion list, if there is more than one element. If there is none or one, Enter currently quits. User's are very likely to fall into this trap, as jid is meant to explore the json structure. thus we cannot expect that the user predicts the structure correctly.

When jid quits, it prints the selected value to the console. I'd also suggest to print a trailing newline. Currently the selected value just squeezes in before the prompt, and users may miss the fact, that it is actually there.

@lodenrogue
Copy link
Author

Wow I just realized I opened this in 2016. That's over 5 years ago. Any progress on this?

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

No branches or pull requests

8 participants