Earlier quoted context omitted.
bat does not look like a pager: https://github.com/sharkdp/bat?tab=readme-ov-file#automatic-...
In fact it's not. The name itself mimicks cat, not less. It's a filter that adds annotations to its input, such as syntax highlighting, git diffs and special-char coloring. Personally I can't find any use for bat: I'm a devote user of vim for editing, and it already does all of this, so why not using it to view files as well? It's satisfying to have the same interface, colors and shortcuts whether you're editing or v…
I made a terminal pager
41–50 of 51 posts
Re: I made a terminal pager
#42Slightly related: I am an Arab who speaks Arabic and reads Arabic and the only place I ever see the unicode character ﷽ is by programmers giving an example of "unicode is too hard". Perhaps as a graphical element at the beginning of books, too. It is a part of the Arabic Presentation Forms block which explicitly is for supporting legacy encodings and should not be used.
The whole phrase is one character?
Re: I made a terminal pager
#43I am definitely waiting for a "modern less replacement" in the same vein as fd, sd, fzf, and the rest of the under-20yo cli crew. I get that "less" is reasonably maintained still. I think the killer feature for me would be refresh. I get that this can't work for piped input, but I want `git diff` to show in a pager with a refresh button that holds my place. fzf supports both refresh and piped input, so perhaps there'…
Re: I made a terminal pager
#44Slightly related: I am an Arab who speaks Arabic and reads Arabic and the only place I ever see the unicode character ﷽ is by programmers giving an example of "unicode is too hard". Perhaps as a graphical element at the beginning of books, too. It is a part of the Arabic Presentation Forms block which explicitly is for supporting legacy encodings and should not be used.
The whole phrase is one character?
Re: I made a terminal pager
#45Slightly related: I am an Arab who speaks Arabic and reads Arabic and the only place I ever see the unicode character ﷽ is by programmers giving an example of "unicode is too hard". Perhaps as a graphical element at the beginning of books, too. It is a part of the Arabic Presentation Forms block which explicitly is for supporting legacy encodings and should not be used.
The whole phrase is one character?
But it is indeed just the single character (U+FDFD)
Re: I made a terminal pager
#46I am definitely waiting for a "modern less replacement" in the same vein as fd, sd, fzf, and the rest of the under-20yo cli crew. I get that "less" is reasonably maintained still. I think the killer feature for me would be refresh. I get that this can't work for piped input, but I want `git diff` to show in a pager with a refresh button that holds my place. fzf supports both refresh and piped input, so perhaps there'…
Re: I made a terminal pager
#47Earlier quoted context omitted.
I've noticed that subconsciously, I've started to use `bat` for interactive paging, even though that's not its main use case
Bat just uses less internally. And it deliberately breaks less’ handling of ^C, annoyingly.
Re: I made a terminal pager
#48Well-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…
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"
endRe: I made a terminal pager
#49I am definitely waiting for a "modern less replacement" in the same vein as fd, sd, fzf, and the rest of the under-20yo cli crew. I get that "less" is reasonably maintained still. I think the killer feature for me would be refresh. I get that this can't work for piped input, but I want `git diff` to show in a pager with a refresh button that holds my place. fzf supports both refresh and piped input, so perhaps there'…
Re: I made a terminal pager
#50[flagged]
Author here! If I were to give this post a longer title, it would be "I made a terminal pager because I needed a really good viewport component for my Go TUIs, then realized that a TUI viewport is just a mini terminal pager and I want the same text navigation and manipulation experience everywhere that I encounter long text blocks in my terminal". I take no issue at all with `less`, it's super powerful and configurab…