News for hackers. Stuff that matters.
Re:I made a terminal pager by da_rob on Thursday April 16, 2026 @03:17AM (#47789723)
Well-written article!

I wish there was some kind of standard to tell CLI apps what features to expect from the system pager, so they can act accordingly …

Right now, apps can talk to the terminal to check for feature support, but all of that falls apart when the output is piped to a pager. (Do we support inline links? ANSI colors? Sixel support??)

Shameless plug, specifically regarding Sixel support: I needed a pager with better image support than just less -r and made https://github.com/roblillack/lessi

Re:I made a terminal pager by Cthulhu_ on Thursday April 16, 2026 @05:35AM (#47790755)
To be pedantic, you mean a standard like IEEE 1003 aka POSIX? (https://pubs.opengroup.org/onlinepubs/9799919799/utilities/m...)
Re:I made a terminal pager by xk3 on Thursday April 16, 2026 @05:16PM (#47799606)
maybe just check TERM? although to be honest--do you even need a pager if your shell/terminal is nice enough?

I rarely pipe to a pager because kitty/fish/tmux support OSC 133 pretty well and I can press one button to go up to the previous command prompt and another button to go back. I can press a few keys to search the scrollback. It all works seamlessly across SSH sessions too if you set it up right.

    # tmux
    bind-key -T copy-mode C-Home send -X history-top
    bind-key -T copy-mode C-End  send -X history-bottom
    bind -T copy-mode C-Up send-keys -X previous-prompt
    bind -T copy-mode C-Down send-keys -X next-prompt

    # kitty
    map ctrl+up scroll_to_prompt -1
    map ctrl+down scroll_to_prompt 1
    map shift+PAGE_UP scroll_page_up
    map shift+PAGE_DOWN scroll_page_down

    # fish shell config.fish
    if test -z "$SSH_TTY"; and test -z "$TMUX"
        bind pageup "kitty @ scroll-window 1p-"
        bind pagedown "kitty @ scroll-window 1p"
    end