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

Explainability #330

Closed gleitz closed 3 years ago

gleitz commented 3 years ago

Would be nice to pass a flag (--explain) and get the way that howdoi chose the answer.

gmelodie commented 3 years ago

So here's my design idea for that feature (two birds one stone):

  1. Successful search without --explain, nothing new happens
  2. Successful search with --explain: show where the answer came from
  3. Unsuccessful search (with or without --explain): show where the answer was supposed to come from (plus the error?)

This would introduce the new functionality and also fix problems like #331.

gleitz commented 3 years ago

Might be interesting to also show counts (hits on search, answers on Stack Overflow, etc)

gleitz commented 3 years ago

I think that https://github.com/gleitz/howdoi/pull/344 is most of the way there. We'll need to look at what happens when you search for a query that returns nothing

python -m howdoi.howdoi ksjfksdjfksd fkdsj -x

cc @KimaruThagna

gleitz commented 3 years ago

We also want to not show (use --explain to learn why) when you have already passed -x

atodorov commented 3 years ago

@gleitz do you mind assigning this to MLH fellow @KimaruThagna

gleitz commented 3 years ago

Yes, this is very close and I would like @KimaruThagna's help. BTW I for some reason can't use the Assignees section so I just mention you in the comment here.

gmelodie commented 3 years ago

I think @KimaruThagna needs to have replied to (aka participated in) this issue at some point so we can assign him.

gleitz commented 3 years ago

Proposed PR: https://github.com/gleitz/howdoi/pull/381