4 ms·
> Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search. There should be. I think `curl cheat.sh/programming+question` do
by boogies 6y ago
> Wonder if there could be a shell tool to just dump the first stackoverflow hit for a search.
There should be. I think `curl cheat.sh/programming+question` does that. There might also be a way to do that with surfraw. I just use DuckDuckGo, it almost always pops up an Stack Exchange answer in the sidebar when I search for something relevant to an SE.
- IggleSniggle 6y agoI really love cht.sh, but find I never actually use it except for the occasional git syntax reminder. I think a flow that went `cht.sh -> fzf to narrow results and select a result -> vim -> OS clipboard` would have me using it all the time.
- kylebenzle 6y agoFunny, I have been asking this EXACT question on Linux forums and here for several months. "How can I have a shortcut that I type, then enter a search query and have the first result open automatically?"
- fowlie 6y agoI have a fish function to open StackOverflow in Lynx. I can just do `stack how to write a function in fish shell`.