gleitz / howdoi

instant coding answers via the command line
http://blog.gleitzman.com/post/43330157197/howdoi-instant-coding-answers-via-the-command-line
MIT License
10.56k stars 867 forks source link

Add checks when it comes to something like `range` #471

Closed CaedenPH closed 4 months ago

CaedenPH commented 1 year ago

Description

Add a range check. For example, it makes logical sense that you can't have a valid question under 2 characters long, and probably above 150 either.

Additional Comments (if any)

~ howdoi e
e
~ howdoi e --explain
INFO: Version: 2.0.20
INFO: Fetching answers for query: e
INFO: Using cached links
INFO: Links from stackoverflow.com found on google: 1
INFO: URL: https://stackoverflow.com/questions/71039088/what-is-onchange-e-setnamee-target-value-in-react-mean
INFO: Answers requested: 1, Starting at position: 1
INFO: Using cached page: https://stackoverflow.com/questions/71039088/what-is-onchange-e-setnamee-target-value-in-react-mean
INFO: Total answers returned: 1

This is what happens when you run e... Questionable behavious

Have you read the Contributing Guidelines on Pull Requests on mkdocs?

Yes

gleitz commented 1 year ago

I would be happy to accept a PR that limits the query to >=2 characters long.

renatocfrancisco commented 4 months ago

@CaedenPH 8pmbgp

Also, close issue?