srsudar / eg

Useful examples at the command line.
MIT License
1.8k stars 98 forks source link

Use better pager command options #59

Closed scorphus closed 8 years ago

scorphus commented 8 years ago

Hello, @srsudar!

As you have not yet released a new version may I propose this change.

I've been using those options for some time now. What do you think of making them official?

srsudar commented 8 years ago

Hmm, to the best of my knowledge I released 0.1.3 on 2016-05-08, as I think I see on pypi. What makes you say I haven't released a version? Did I forget to push a tag or something like that?

Those changes look good to me. Can you clarify a little bit for me what some do? I don't notice an immediate difference paging with -M and -X. The man page describes things I'm not sure I see... Can you sum up why you like them?

scorphus commented 8 years ago

Sure! As soon as I get home, in about 20 min. Em 12/05/2016 21:34, "Sam Sudar" notifications@github.com escreveu:

Hmm, to the best of my knowledge I released 0.1.3 on 2016-05-08, as I think I see on pypi https://pypi.python.org/pypi/eg. What makes you say I haven't released a version? Did I forget to push a tag or something like that?

Those changes look good to me. Can you clarify a little bit for me what some do? I don't notice an immediate difference paging with -M and -X. The man page describes things I'm not sure I see... Can you sum up why you like them?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/srsudar/eg/pull/59#issuecomment-218923629

scorphus commented 8 years ago

Hmm, to the best of my knowledge I released 0.1.3 on 2016-05-08, as I think I see on pypi. What makes you say I haven't released a version? Did I forget to push a tag or something like that?

Ah! That's it. I didn't see any new tag. Then my mind tricked me into believing there was no new release. Which, by the way, gives you a hint 😃

Those changes look good to me. Can you clarify a little bit for me what some do? I don't notice an immediate difference paging with -M and -X. The man page describes things I'm not sure I see... Can you sum up why you like them?

Absolutely:

This, in turn, hints me to improve the comments regarding these options in config.py 😄

srsudar commented 8 years ago

I think the comments are good, my problem is just that I am struggling with less.

-K works.

For me on Mac less quits automatically (without passing -F) if the file fits in one screen. On my Ubuntu machine it never quits if it fits on one screen, with or without -F.

-M isn't changing the output for me, either passed manually with the --pager-cmd flag or with your patch applied.

-X doesn't seem to be doing anything for me either.

Are they making changes for you? What system are you on? I've checked and don't have less aliased or anything so far as I can tell, so I'm quite confused.

scorphus commented 8 years ago

As soon as I get home I'll answer your questions and record an asciinema explaining each option. Sorry, couldn't make it. Fridays...

scorphus commented 8 years ago

As promised, here's the recording. Best viewed full screen.

asciicast

p.s.: I'm happy making a more detailed recording, with comments.

srsudar commented 8 years ago

Wow great video. That all makes perfect sense. I seem to be getting -RMFKX behavior by default, even explicitly trying to pass a subset of those flags. I wonder why that is. Happy to merge.