ov is a terminal pager.
ov
be used instead ofless
ormore
ortail -f
.ov
also has an effective function for tabular text.
-
- 2.1. deb package
- 2.2. rpm package
- 2.3. MacPorts (macOS)
- 2.4. Homebrew(macOS or Linux)
- 2.5. pkg (FreeBSD)
- 2.6. Binary
- 2.7. go install
- 2.8. go get(details or developer version)
-
- 3.1. Basic usage
- 3.2. Config
- 3.3. Header
- 3.4. Column Mode
- 3.5. Wrap/NoWrap
- 3.6. Alternate-Rows
- 3.7. Section
- 3.8. Follow mode
- 3.9. Follow all mode
- 3.10. Follow section mode
- 3.11. Exec mode
- 3.12. Search
- 3.13. Mark
- 3.14. Watch
- 3.15. Mouse support
- 3.16. Multi Color Highlight
- 3.17. Plain
- 3.18. Jump Target
-
- 6.1. Style customization
- 6.2. Key binding customization
Feature
1.- Supports fixed header line display (both wrap/nowrap).
- Supports column mode, which recognizes columns by delimiter.
- Supports section-by-section movement, splitting sections by delimiter.
- Dynamic wrap/nowrap switchable.
- Supports alternating row styling.
- Shortcut keys are customizable.
- The style of the effect is customizable.
- Supports follow-mode (like tail -f).
- Supports follow-section, which is displayed when the section is updated.
- Supports following multiple files and switching when updated(follow-all).
- Supports the execution of commands that toggle both stdout and stder for display.
- Supports watch mode, which reads files on a regular basis.
- Supports incremental search and regular expression search.
- Better support for Unicode and East Asian Width.
- Support for compressed files (gzip, bzip2, zstd, lz4, xz).
- Suitable for tabular text. psql, mysql, etc…
Install
2.deb package
2.1.You can download the package from releases.
curl -L -O https://github.com/noborus/ov/releases/download/vx.x.x/ov_x.x.x-1_amd64.deb sudo dpkg -i ov_x.x.x-1_amd64.deb
rpm package
2.2.You can download the package from releases.
sudo rpm -ivh https://github.com/noborus/ov/releases/download/vx.x.x/ov_x.x.x-1_amd64.rpm
MacPorts (macOS)
2.3.Homebrew(macOS or Linux)
2.4.brew install noborus/tap/ov
pkg (FreeBSD)
2.5.Binary
2.6.You can download the binary from releases.
curl -L -O https://github.com/noborus/ov/releases/download/vx.x.x/ov_x.x.x_linux_amd64.zip unzip ov_x.x.x_linux_amd64.zip sudo install ov /usr/local/bin
go install
2.7.It will be installed in $GOPATH/bin by the following command.
go install github.com/noborus/ov@latest
go get(details or developer version)
2.8.First of all, download only with the following command without installing it.
go get -d github.com/noborus/ov cd $GOPATH/src/github.com/noborus/ov
Next, to install to $GOPATH/bin, run the make install command.
Or, install it in a PATH location for other users to use
(For example, in /usr/local/bin).
make sudo install ov /usr/local/bin
Usage
3.Basic usage
3.1.ov supports open file name or standard input.
Used by other commands by setting the environment variable PAGER.
See the ov site for more use cases.
Config
3.2.You can set style and key bindings in the setting file.
Create a .ov.yaml
file in your user’s home directory.
for example.
Windows.
Please refer to the sample ov.yaml configuration file.
If you like less
key bindings, copy ov-less.yaml and use it.
Header
3.3.The --header
(-H
) option fixedly displays the specified number of lines.
When used with the --skip-lines
option, it hides the number of lines specified by skip and then displays the header.
ov --skip-lines 1 --header 1 README.md
Column Mode
3.4.Specify the delimiter with --column-delimiter
and set it to --column-mode
to highlight the column.
ov --column-delimiter "," --column-mode test.csv
Wrap/NoWrap
3.5.Supports switching between wrapping and not wrapping lines.
The option is --wrap
, specify --wrap=false
if you do not want to wrap.
After startup, toggle display with wrap (default key w
).
Alternate-Rows
3.6.Alternate row styles with the --alternate-rows
(-C
) option
The style can be set with Style customization.
ov --alternate-rows test.csv
Section
3.7.You specify --section-delimiter
, you can move up and down in section units.
The start of the section can be adjusted with --section-start
.
The section-delimiter is written in a regular expression (for example: “^#”).
(Line breaks are not included in matching lines).
For example, if you specify “^diff” for a diff that contains multiple files,
you can move the diff for each file.
Follow mode
3.8.Output appended data and move it to the bottom line (like tail -f
).
ov --follow-mode /var/log/syslog
(while :; do echo random-$RANDOM; sleep 0.1; done;)|./ov --follow-mode
Follow all mode
3.9.Same as follow-mode, and switches to the last updated file when there are multiple files.
ov --follow-all /var/log/nginx/access.log /var/log/nginx/error.log
Follow section mode
3.10.Follow mode is line-by-line, while follow section mode is section-by-section.
Follow section mode displays the bottom section.
The following example is displayed from the header (#) at the bottom.
ov --section-delimiter "^#" --follow-section README.md
Watch mode is a mode in which --follow-section
and
--section-delimiter "^f"
are automatically set.
Exec mode
3.11.Execute the command to display stdout/stderr separately.
Arguments after (--
) are interpreted as command arguments.
Shows the stderr screen as soon as an error occurs, when used with --follow-all
.
ov --follow-all --exec -- make
Search
3.12.Search by forward search /
key(default) or the backward search ?
key(defualt).
Search can be toggled between incremental search, regular expression search, and case sensitivity.
Displayed when the following are enabled in the search input prompt:
Function | display | (Default)key | command option |
---|---|---|---|
Incremental search | (I) | alt+i | –incremental |
Regular expression search | (R) | alt+r | –regexp-search |
Case sensitive | (Aa) | alt+c | -i, –case-sensitive |
Mark
3.13.Mark the display position with the m
key(default).
The mark is decorated with StyleMarkLine
and MarkStyleWidth
.
Marks can be erased individually with the M
key(default).
It is also possible to delete all marks with the ctrl + delete
key(default).
Use the >
next and <
previous (default) key to move to the marked position.
Watch
3.14.ov
has a watch mode that reads the file every N seconds and adds it to the end.
When you reach EOF, add 'f' instead.
Go further to the last section.
The default is'section-delimiter', so the last loaded content is displayed.
for example.
ov --watch 1 /proc/meminfo
Mouse support
3.15.The ov makes the mouse support its control.
This can be disabled with the option --disable-mouse
.
If mouse support is enabled, tabs and line breaks will be interpreted correctly when copying.
Copying to the clipboard uses atotto/clipboard.
For this reason, the 'xclip' or 'xsel' command is required in Linux/Unix environments.
Selecting the range with the mouse and then left-clicking will copy it to the clipboard.
Pasting in ov is done with the middle button.
In other applications, it is pasted from the clipboard (often by pressing the right-click).
Multi Color Highlight
3.16.This feature styles multiple words individually.
.
key(defualt) enters multi-word input mode.
Enter multiple words (regular expressions) separated by spaces.
For example, error info warn debug
will color errors red, info cyan, warn yellow, and debug magenta.
It can also be specified with the command line option --multicolor
(oor -M
).
For command line options, pass them separated by ,(comma).
For example:
$ ov --multicolr "ERROR,WARN,INFO,DEBUG,not,^.{24}" access.log
Plain
3.17.Supports undecorating ANSI escape sequences.
The option is --plain
(or -p
).
After startup, toggle the original decoration (default key ctrl+e
).
Jump Target
3.18.You can specify the lines to be displayed in the search results.
This function is similar to --jump-target
of less
.
Positive numbers are displayed