It's also much nicer looking and more interactive, FWIW...I also agree with its defaults.
$ howdoi inverse grep a file
Simply pops this up:
$ grep -L "foo" *
...apparently it scrapes the answer result and print the last occurrence of code-formatted text.
Whereas `how2` pretty-prints the entire answer, narrative and code, so I know what the respondent was actually addressing. FWIW, both tools don't address what I want (I was thinking `grep -v`)...but that's not a fault of the tools, but of the ambiguity in how we ask questions. `howdoi` has far more faith in there being "Just One Answer"...where `how2` let's you move very quickly between the relevant choices, giving you the right amount of context to navigate.
The difference is that it's verbosity and pretty-print is the default for how2, and I think that's the more sensible choice, because it saves me the trouble of having to remember how to invoke it with flags just to get decent output from it. By the time I need to seek help, I'm willing to put up with verbosity.
Nice! Installed it and will now make it part of all the computers I use.
I found this funny:
> It uses Google and Stackoverflow APIs, because Stackoverflow search on its own doesn't works as well.
It doesn't really make sense why Google would be a better entrance point into StackOverflow's content -- but it is -- as I imagine the Google algorithm uses SO's API itself to incorporate SO's data into pagerank in some way (the tags, the points, etc.)...OTOH, after landing on a particular question via Google, if it isn't the thing I actually need, I find SO's list of related questions to almost always be on point.
I think google flags accounts as programmers and treats their searches differently. If I'm logged out of Google, searching for programming questions sometimes leads to sites on completely unrelated topics. Whereas when I'm logged into my account, from which 99% of my searches are programming intensive, I get all relevant programming results.
Google does this with all areas of interest. Politics, knitting, cat videos, programming etc. Sometimes it is useful sometimes it will re-enforce an echo chamber effect.
I don't think it's weird at all. Google has some of the brightest search minds and years of experience; an site's team is lucky to have someone on staff who even knows what porter-stemming is.
Ok, true. I've personally found that I can kick Google's butt simply because Google cannot trust the site's creator. This puts them at a big disadvantage right out of the gate.
It's not that weird. I know what content is on my site, but fuzzy matching the vast variety of input strings is non-trivial to do well. (Emphasis on 'to do well' because there are a lot of ways to get it working but poorly.)
But then I saw the video, the way you can specify a language, and the nice format that results are displayed in, along with the option to see more options - this is actually quite nice!
It would be good to have the option to use it with Server Fault (also from StackExchange network) too.
Over the long run, if I'm living in the terminal rather than the browser, I probably will be better off learning to be effective finding help via `man` pages rather than taking on a dependency on a latent network connection and "possibly" relevant content...and node and npm and javascript.
In the short run, a tool like this may make it easier to get to the point where I am living in the terminal.
My first reaction ("Wowza!") was tempered by the fear that this sort of intervening layer may erode participation (and thus quality) of Stack Overflow. I suppose such a thing will never be popular enough to make this sort of effect.
Another alternative that just searches google (or bing if you want to go crazy) and extracts commands from the search hits: https://github.com/jimmyppi/searchcmd
"how2 -l cmd change directory" works for me. "how2 -l cmd enable tab completion" still returns nothing, though; I think that's just a query it can't answer. (A quick manual search returned totally unhelpful results, so I wouldn't blame how2 for that...)
Saw this earlier this morning but just had to use it and boom! It worked perfectly. I really like the idea of using things on the console and the user interface is nice and sleek. would love to see this getting even better over time!
Awesome! It would be great if I could use it to query any stackexchange site, like TeX, for instance. Like `how2 prevent table from floating -s tex` would search on tex.se