Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure of more command with -R option #781

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

hogelog
Copy link
Contributor

@hogelog hogelog commented Nov 22, 2023

I believe the more command generally does not accept the raw option (-R).
As an example, the more command man included in util-linux shown below does not have the -R option.
https://man7.org/linux/man-pages/man1/more.1.html
When I run pager with irb in an environment where the -less command does not exist, I get the following error

root@12afc3afe8da:/app# irb
irb(main):001> ls File
more: invalid option -- 'R'
Try 'more --help' for more information.
=> nil
irb(main):002> 

After installing the irb gem with this Pulll Request modification, I was able to successfully execute pagenation with more.

@hogelog
Copy link
Contributor Author

hogelog commented Nov 22, 2023

The test is failing. Seems like perhaps a fix in @tompng's https://github.com/tompng/irb/tree/prism_match_write_case_match branch would fix it.

@hogelog
Copy link
Contributor Author

hogelog commented Nov 23, 2023

Rebased onto 943c14b and force pushed to pass test.

Copy link
Member

@tompng tompng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request.

In my macOS, more command accepted -R option because it was actually less (!)

$ more --version
less 581.2 (POSIX regular expressions)
Copyright (C) 1984-2021  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less

@tompng tompng merged commit 7d6849e into ruby:master Nov 23, 2023
24 checks passed
@hogelog hogelog deleted the more-without-raw-option branch November 23, 2023 11:37
@hogelog
Copy link
Contributor Author

hogelog commented Nov 23, 2023

Thank you for merging this!

In my macOS, more command accepted -R option because it was actually less (!)

Yes, exactly what I was confused about at first too😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants