Skip to content

Add pager functionality back in - #155

Open
matthiasbeyer wants to merge 1 commit into
git-bahn:masterfrom
matthiasbeyer:add-pager
Open

matthiasbeyer wants to merge 1 commit into
git-bahn:masterfrom
matthiasbeyer:add-pager

Conversation

@matthiasbeyer

Copy link
Copy Markdown

Use $GIT_PAGER or core.pager or $PAGER to bring back paging behaviour.

As discussed in #121 - this brings back the paging behaviour, but not the internal self-written pager functionality, but $GIT_PAGER or core.pager or $PAGER instead.

What do you think?

Use $GIT_PAGER or core.pager or $PAGER to bring back paging behaviour.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@matthiasbeyer

Copy link
Copy Markdown
Author

CI fails because of code I did not touch.

Comment thread src/main.rs
.num_args(1),
)
.arg(
Arg::new("no-pager")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you happen to know if there is a NO_PAGER or other env var equivalent to the fairly standardized NO_COLOR that can disable this universally in a shell?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think the more common thing people do is PAGER=cat in front of the command (or GIT_PAGER=cat of course). I cannot remember that I saw NO_PAGER ever... 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes I've certainly used the cat stand in a time or two myself. I just looked around and it seems like you're right and there isn't a widely recognized env var far this. SYSTEMD_PAGER and MANPAGER are worth having in a back pocked along with GIT_PAGER, but nothing I see is generic and should be implemented here. So carry on!

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.

2 participants