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

Try less and more when pager is not found (on macOS?) #714

Closed
wants to merge 1 commit into from

Conversation

wdoekes
Copy link
Member

@wdoekes wdoekes commented Apr 5, 2024

Closes: #711
Reported-by: Ryan Carsten Schmidt

Closes: #711
Reported-by: Ryan Carsten Schmidt
@@ -756,7 +756,15 @@ static char* wrap(const char* in, int offset, int size)
/* If stdout is a TTY, wrap stdout in a call to PAGER (generally less(1)).
* Returns a pid_t you'll have to pass to end_pager(). */
static pid_t begin_pager() {
char pager[15] = "/usr/bin/pager";
char const *pager_options[4] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

std::vector<std::string>? Iteration is easier, and you won't need a copy, you can pass &opt[0].

Copy link
Member Author

Choose a reason for hiding this comment

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

🤷

I guess we should do more c++. Be my guest 😬

I assume we won't need a copy because it is a copy already.

Copy link
Contributor

@orgads orgads left a comment

Choose a reason for hiding this comment

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

You can merge this as it is, I'll C++ify it later :)

@wdoekes
Copy link
Member Author

wdoekes commented Apr 6, 2024

closed by 3242112

@wdoekes wdoekes closed this Apr 6, 2024
@wdoekes wdoekes deleted the feat/pager-on-macosx-711 branch April 6, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/usr/bin/pager: No such file or directory
2 participants