Or the more mature 'howdoi' - https://github.com/gleitz/howdoi
$ howdoi unzip bz2
readcsvbz2file <- read.csv(bzfile("file.csv.bz2"))
how2 switches API depending on what language you are querying.
$ 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.
Well done OP!
~> howdoi parse json python
{"maps":[{"id":"blabla","iscategorical":"0"}, {"id":"blabla","iscategorical":"0"}],
"masks":{"id":"valore"},
"om_points":"value",
"parameters":{"id":"valore"}
}
Yep can't agree more. howdoi -a inverse grep a file
Even basic syntax highlighting is supported using `-c`. alias howdoi="howdoi -a -c "
The other improvements from how2 being a curses app are helpful though.