Questions tagged [pager]
The pager tag has no usage guidance.
98 questions
4
votes
1
answer
215
views
How do I stop 'more' from stopping and displaying "(END)" at the end of files in Debian 12 (bookworm)?
Since upgrading to Debian 12 (bookworm), the more command seems to have been changed and now comes to a stop when you reach the end of the file you are viewing and then displays "(END)", ...
3
votes
2
answers
333
views
how to alias the `history` function in fish shell
I'm trying to set the fish history pager to be bat -l fish for syntax highlighting.
(i.e. set the PAGER environment variable bat -l fish just for the history command).
I tried:
# 1:
alias history &...
6
votes
4
answers
2k
views
How do I add line numbers to the man page?
How can I add line numbers to man pages or info pages in Linux?
I want to use line numbers to navigate in man pages.
I can write the man page in a file and then open it with Vim, but is there a better ...
2
votes
2
answers
891
views
How do I change the PAGER variable for man if it's possible?
I'm not an expert in Linux, but I was reading an introductory book and found that man pages use the PAGER environment variable to show the content of man pages. I checked printenv and didn't find any ...
0
votes
3
answers
199
views
open man (or info) pages from the same position where you left off last time
I treat man pages is the primary source of documentation about installed software.
I would like to use them not only as a reference, but actually read them from beginning to end.
And here comes the ...
0
votes
1
answer
86
views
mkfs.xfs completely ignoring "|more" redirect
trying to install gentoo linux and can't format the drive with xfs because when I run mkfs.xfs /dev/sda3 it throws an error and then displays help, but the help is so big that it takes up the entire ...
2
votes
1
answer
367
views
Oh-my-zsh deletes output of successful command with "FAIL: 141"
My Oh-my-zsh does the following:
When I run the git log --pretty --oneline command, it shows me a long list of commits, as expected.
As soon as I hit q, it suddenly disappears with the below output:
...
10
votes
1
answer
782
views
Issue viewing compressed file with "zless", but not with "zmore" or "gunzip -c"
On my FreeBSD 13.2 system, the zless utility cannot view text files compressed with gzip or compress, warning that they may be binary files and then showing garbage if I say I want to see the contents ...
0
votes
1
answer
283
views
Any 'cat' colorized tool? [duplicate]
I sometimes cat a c file or a JSON file, there is no colorful format text.
Is there any command line tool that can show colorful format text as it is in ex: gedit?
1
vote
1
answer
120
views
Any CLI pager that display full-screen optionaly (when prompted to)?
I've been using less forever now, and there's one thing I wish it was doing differently.
When I do git log --pretty=oneline --abbrev-commit it switches to full-screen immediately (as the output is ...
1
vote
2
answers
1k
views
Systemd `journalctl` - Unable to change default $PAGER
I'm on Arch Linux.
I came across some new pager software called OV and installed it. It has more features than less and I like it so I want to set it as my default pager.
I added the following to my ....
2
votes
1
answer
110
views
Scroll to the end in less without stretching out single-page input
When I pipe something into less --quit-if-one-screen +G (alias -F +G), less opens and scrolls to the end if the output exceeds the terminal size.
Unfortunately, it also scrolls to the end before ...
0
votes
1
answer
105
views
less option "--save-marks" does nothing when less is used as a manual pager
I use less version 590 (GNU regular expressions).
I use
export LESSFILE="/root/.lesshst_for_manpages"
export MANPAGER="pager --save-marks -I"
man -L en <<somemanpage>>
...
1
vote
1
answer
457
views
simplest possible pager
In mc (midnight commander), I can define custom command for viewing files, ie:
shell/i/.jpg
Open=gpicview %f
View=file %f | less
The command file %f has to be piped to a pager. I am using ...
3
votes
2
answers
706
views
How to pipe a man page (without pagination) while intentionally preserving formatting?
Minimal example:
man git | cat
Real example:
man git | grep --color=always -C 3 "pathspec"
FWIW, I've tried --pager="cat" using various pagers, as well as piping to various ...
1
vote
1
answer
203
views
Auto page down / scrolling after a few seconds using more, less, or something similar
When using more or less, the output is paused at the end of each page.
Is there some way to have it pause only for a few seconds (configurable or not), and then continue to the next page? Is there ...
5
votes
1
answer
385
views
How to avoid the "pager" in mailx?
Having many short mail messages in my inbox, it's quite annoying that even short messages are sent though a pager (less), requiring to press 'q' before I can view the next message (for example).
I ...
0
votes
1
answer
72
views
Make `less` exit after last page or `more` interpret colors
In a script, I’m doing a git diff that I want to quickly page through. When I’m finished, the pager will exit and the script will continue.
more is great for the task, because I can space through it ...
2
votes
1
answer
324
views
lesskey: add alt+right keybinding to less
I used cat -vte to see what escape codes my terminal emulator sends when I press alt+right:
❯ cat -vte
^[[1;3C
Then I added this escape code to my lesskey file ~/.less:
\e[1;3C forw-scroll
Finally ...
4
votes
1
answer
290
views
How does a command decide when to invoke a pager?
Some shell commands that produce large outputs, such as git diff, seem to cleverly throw up a pager when the output is too long, but not do so if it happens to be small.
How does this work? Does each ...
1
vote
1
answer
358
views
In Less, how to jump horizontally between search matches on the same line?
On pressing n, Less skips all the search matches in the current line and moves to the next line with a match (even if the lines are wrapped). How can I make it move the cursor to all the matches in ...
0
votes
2
answers
3k
views
Is there a more interactive man and info pages viewer?
If I use man to view man pages, they are not interactive at all, I can merely change the visuals through a pager.
With info I can view man and info pages with interactive links, including the links in ...
4
votes
1
answer
201
views
less doesn't page the output when called inside env
After an update I noticed that my bash profile for man colorization breaks paging. I don't know what changed but I narrowed it down to the fact that calling env less hello.txt results in contents of ...
2
votes
0
answers
465
views
Bash: how do I pipe the output of every command through "less --quit-if-one-screen"?
When I run some commands in Bash, I have no idea how many number of lines the output will be. If the number of lines in the output exceeds the height of my terminal, I will not be able to see the ...
1
vote
1
answer
124
views
Horizontal scrolling pager with vi keys
less and most use j and k, but they don't use h and l for horizontal scrolling. Is there a way I can fix either of these to do that? or maybe an alternative tool that I could use as a pager that does ...
0
votes
3
answers
1k
views
Why are PAGER, EDITOR, VISUAL empty?
When I try to use those environment variables, I get an empty string:
$ $PAGER some_file;
bash: some_file: command not found
$
I tested a few things:
$ echo $PAGER;
$ man man; ## Here it's using ...
1
vote
1
answer
320
views
How to set background color of $PAGER?
I usually set my terminal with transparent background. But, when I need to read a lot of text such as man, less, cat, etc., I want my background color to be solid black. I can change the backgrounds ...
1
vote
1
answer
423
views
prevent less linewrapp from breaking words -- split on white space only
I want less's linewrapping to be smarter... when lessing through text it's wrapping lines in such a way that words get broken up which makes reading difficult. The smart way would mean only breaking ...
0
votes
0
answers
27
views
How to use normal output with systemctl instead of less/more? [duplicate]
For example: systemctl list-units --type service by default uses redirection to less/more, how to disable it?
9
votes
1
answer
966
views
less - How to get matching line not be the top line on screen?
Very often happens that I do
$ man someprogram
to inspect the manual for some program. Often I also want to search for something in there, and I simply hit / and write whatever I want to search for.
...
2
votes
1
answer
934
views
How can I display only the first screenfull of output, including all terminal colours, and lines that will be wrapped? [duplicate]
I have a command (a compiler) that can output lots to the terminal when there's a compilation problem. Some of the lines are longer than my terminal is wide, and it also uses terminal colours (red ...
0
votes
1
answer
135
views
How do I get source highlighting via source-highlight for most?
I can get source highlighting to work with lesspipe or GNU source-highlight, but both depend on environment variables that are specific to less. How would I get syntax highlighting in most?
0
votes
2
answers
3k
views
Obtaining starting adress of a page
I want to obtain the beginning of a memory page, a page that contains a function.
In my case I try to achieve the page beginning of main function. Which lies in 0x400a80, I think it is in code ...
4
votes
1
answer
230
views
How to prevent less --quit-if-one-screen --no-init +G from filling the screen with empty lines when the file is shorter than the screen?
I use
less -XFR +G
to page some variations of git log, and all four options are important.
The thing I don't like is that it fills the screen with empty lines (marked with ~) when the log/file is ...
1
vote
1
answer
179
views
Getting error when searching within an info page
I'm using the Fish shell on openSUSE Tumbleweed (20200414). I am able to initially search for a string within an info page by typing '/string'. However, when I try to search for the next occurrence ...
4
votes
2
answers
326
views
How to search for end-of-line hyphenated words in less(1)
Does less (or any other lightweight pager I could use as $PAGER) has such a feature?
For example, if I type man bash and then enter /incorporates it doesn't find the word, despite it being right ...
0
votes
1
answer
537
views
Why is `man` outputing to stdout instead of $PAGER (less)?
When I run man [program], the man page text is output on the terminal (a la cat, without a pager that provides interactivity) instead of opening the man page file in less (so you can scroll, search, ...
2
votes
1
answer
268
views
Why doesn't Esc-[ scroll left in `less`?
According to the manpage for lesskey,
the following keys are bound to left-scroll and right-scroll:
\e[ left-scroll
\e] right-scroll
\e( left-scroll
\e) right-scroll
\kl ...
0
votes
0
answers
68
views
Bashrc not loading when running manpager
I have found issues with using the MANPAGER variable in bash in order to set vim to be my manpager.
Initially I set my manpager using the method shown in :help manpager by doing:
export MANPAGER="...
5
votes
3
answers
253
views
Restore interactive commands after accidentally overpaging pipe input to less?
Consider a script like this:
$ cat example.sh
#! /usr/bin/env bash
for i in {1..90}
do
printf '%s\n' "$i"
done
sleep 10
printf '91\n'
sleep 10
printf 'done\n'
and suppose the output is piped to ...
1
vote
2
answers
144
views
less: advertise terminfo through pipe
If I do ls | less, ls detects that it isn't connected to a terminal, which is fair enough. Except that less is connected to a terminal. In this setup, ls could produce the coloured and columnised ...
1
vote
2
answers
1k
views
navigating forward in more pager using f
It is given in the man page of more that f is used to skip forward k screenful of text(default to 1).I saved a very long file using cat and used more to show it on the screen page by page but when i ...
-1
votes
1
answer
214
views
Unable to search a string using more pager
I opened a file using the more pager,i was trying to find a string in this file using / as shown in the figure below,but it is saying that pattern not found even though the string i have searched is ...
1
vote
1
answer
1k
views
man pages no longer rendering - lots of "permission denied" errors related to pager / vimpager
For reasons I can't determine, within the last two days the "man" command stopped working on my linux server (Ubuntu 18.04). When attempting to run man <anything> I end up at a blank instance ...
10
votes
1
answer
13k
views
changing default (man) pager
I'm working on Solaris 10, using bash. Want to change default pager from "more" to "less" (because "less is more" :). Tried to do the following:
PAGER=less
PS. When I do it in csh via
setenv PAGER ...
4
votes
1
answer
794
views
How can I keep colorful terminal output, but disable pagers
On macOS man uses the pager "/usr/bin/less -is" (see man's man page). When I type man , I see colorized output, and I like this. But, I prefer to use the terminal's find commands when using man, and ...
3
votes
3
answers
1k
views
Using 'less' to leave text on screen for small files
I'm pretty sure seeing this customization of the less command on some colleague system long ago, in order to imitate 'more'. What I want:
If the file is short (less that one screen long), it should ...
0
votes
1
answer
222
views
Lightweigtht pager with links?
Are there any pagers/readers/viewers for the use inside the Linux terminal that can follow links to the same page and different files (not necessarily on the net) which have an simpler markup language ...
5
votes
1
answer
4k
views
Jumping to end/beginning of line in "less -S"
The commonly used pager less can be started with the option -S, prevents it from breaking lines.
One can then press the right and left arrow keys to scroll horizontally.
Since the lines can be quite ...
10
votes
2
answers
4k
views
Is it possible to scroll beyond the end of a file in the less pager?
Is it possible to scroll past the bottom in less?
Ideally, I'd like to be able to see the last line of the file I am viewing at the top of my terminal window (the rest of the screen may be filled ...