jarun / googler

:mag: Google from the terminal
GNU General Public License v3.0
6.11k stars 529 forks source link

Implement -r, --reverse option #339

Closed zmwangx closed 4 years ago

zmwangx commented 4 years ago

Related #281.

$ /googler -r google

 5.  Google - YouTube
     https://www.youtube.com/Google
     Experience the world of Google on our official YouTube channel. Watch videos about our products, technology, company happenings and more. Subscribe
     to ...

 4.  Google - About Google, Our Culture & Company News
     https://about.google/
     Stay up to date with Google company news and products. Discover stories about our culture, philosophy, and how Google technology is impacting others.

 3.  Browse All of Google's Products & Services - Google
     https://about.google/products/
     Browse a list of Google products designed to help you work and play, stay organized, get answers, keep in touch, grow your business, and more.

 2.  The Keyword | Google
     https://www.blog.google/
     Discover all the latest about our products, technology, and Google culture on our official blog.

 1.  Google
     https://www.google.com/
     Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're
     looking ...
jarun commented 4 years ago

Not that way. I meant r as a prompt sub-command. So at the prompt if you press r the results get reversed. However, when we press n or p results should show in the order we fetch.

zmwangx commented 4 years ago

Kinda confused here. Reversing the order is for people with short terminals and want to see the more relevant results without scrolling. With that in mind, why would they use a separate command to only temporarily reverse the order? Seems about as much trouble as scrolling back. I'd expect people who like this behavior to permanently have it enabled.

jarun commented 4 years ago

I'd expect people who like this behavior to permanently have it enabled.

When you go to the second/third page, all results are equally relevant. The problem is having to scroll up to see the top results.

zmwangx commented 4 years ago

Sure, order doesn’t actually matter on pages other than the first, which means reverse is just as good as default. But having to run a separate command to reverse the order of the first page every time is still about as much trouble as scrolling back. “I'd expect people who like this behavior to permanently have it enabled.” still stands.

jarun commented 4 years ago

It helps this way:

We don't work like a pager. We print all results and that may exceed a screenful. With prompt option r, in a page, one can read the last visible results first and then press r to see the topmost results.

Many people are not aware how to scrollback without the mouse.

Ordering the results in reverse doesn't solve the problem.

zmwangx commented 4 years ago

Hmm, ten results won’t necessarily fit onto two pages either, and even if they do, if you need to open anything hidden from view you need to scroll back regardless, so I don’t think “avoid scrolling back at all costs” is what users want, nor is it what they’ll get with an r command.

Meanwhile, at least one user expressed wish for a permanent reversal.

Anyway, I think we’re disagreeing on what’s a less bad compromise on a problem neither of us are particularly concerned about ourselves? I guess my preferred solution then is not choose a compromise (unless you want to use the command yourself.)

jarun commented 4 years ago

Yes, I do think we can give it a rest. :+1: I use a large enough terminal and reasonable enough -n. Given people who use googler plan to sue it for the long term, they should adjust these things like they set up their terminal or editor.