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

Add [y/n] prompt to suggestion #133

Closed
adriens opened this issue Feb 7, 2023 · 3 comments · Fixed by #143
Closed

Add [y/n] prompt to suggestion #133

adriens opened this issue Feb 7, 2023 · 3 comments · Fixed by #143
Labels
enhancement New feature or request

Comments

@adriens
Copy link
Contributor

adriens commented Feb 7, 2023

💡 Idea

As implemented in :

I really enjoy a lot this feature.

💡 Would it possible in the output, in addition to this :

ubuntu $ eol pthon
Product 'pthon' not found, run 'eol all' for list. Did you mean: 'python'?
ubuntu $ 

to reply this :

ubuntu $ eol pthon
Product 'pthon' not found, run 'eol all' for list. Did you mean: 'python'? If yes, try this:
eol python
ubuntu $ 

💰 Benefits

  • The end user only has to copy paste the command 😅

🔖 Related contents

@hugovk
Copy link
Owner

hugovk commented Feb 8, 2023

Alternatively:

$ eol pthon
Product 'pthon' not found, run 'eol all' for list. Did you mean: 'python'? [y/n]

And if they press Y or y:

$ eol pthon
Product 'pthon' not found, run 'eol all' for list. Did you mean: 'python'? [y/n] Y
┌───────┬────────────┬─────────┬────────────────┬────────────┐
│ cycle │  release   │  latest │ latest release │    eol     │
├───────┼────────────┼─────────┼────────────────┼────────────┤
│  3.11 │ 2022-10-24 │  3.11.2 │   2023-02-07   │ 2027-10-24 │
│  3.10 │ 2021-10-04 │ 3.10.10 │   2023-02-07   │ 2026-10-04 │
│  3.9  │ 2020-10-05 │  3.9.16 │   2022-12-06   │ 2025-10-05 │
│  3.8  │ 2019-10-14 │  3.8.16 │   2022-12-06   │ 2024-10-14 │
│  3.7  │ 2018-06-26 │  3.7.16 │   2022-12-06   │ 2023-06-27 │
│  3.6  │ 2016-12-22 │  3.6.15 │   2021-09-03   │ 2021-12-23 │
│  3.5  │ 2015-09-12 │  3.5.10 │   2020-09-05   │ 2020-09-13 │
│  3.4  │ 2014-03-15 │  3.4.10 │   2019-03-18   │ 2019-03-18 │
│  3.3  │ 2012-09-29 │  3.3.7  │   2017-09-19   │ 2017-09-29 │
│  2.7  │ 2010-07-03 │  2.7.18 │   2020-04-19   │ 2020-01-01 │
│  2.6  │ 2008-10-01 │  2.6.9  │   2013-10-29   │ 2013-10-29 │
└───────┴────────────┴─────────┴────────────────┴────────────┘

$ 

If N or n then exit with an error code like before.

If they just press enter, we could default to either yes: [Y/n] or no: [y/N].

@adriens
Copy link
Contributor Author

adriens commented Feb 8, 2023

Brilliant idea ❣️

💡 Would it possible to add a -y option like for apt-get which would automatically answer y ?

@hugovk hugovk added the enhancement New feature or request label Feb 9, 2023
@hugovk hugovk changed the title 💡 Even further with UX and suggestions (for lazy people) Add [y/n] prompt to suggestion Feb 18, 2023
@adriens
Copy link
Contributor Author

adriens commented Feb 18, 2023

Using this feature to help choose products ids :

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

Successfully merging a pull request may close this issue.

2 participants