| 1 |
.\" This manpage has been automatically generated by docbook2man |
| 2 |
.\" from a DocBook document. This tool can be found at: |
| 3 |
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> |
| 4 |
.\" Please send any bug reports, improvements, comments, patches, |
| 5 |
.\" etc. to Steve Cheng <[email protected]>. |
| 6 |
.TH "MOST" "1" "30 July 2022" "" "" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
most \- browse or page through a text file |
| 10 |
.SH SYNOPSIS |
| 11 |
|
| 12 |
\fBmost\fR [ \fB-1\fR ] [ \fB-b\fR ] [ \fB-C\fR ] [ \fB-c\fR ] [ \fB-d\fR ] [ \fB-M\fR ] [ \fB-r\fR ] [ \fB-s\fR ] [ \fB-t\fR ] [ \fB-u\fR ] [ \fB-v\fR ] [ \fB-w\fR ] [ \fB-z\fR ] [ \fB+/\fIstring\fB\fR ] [ \fB+\fIline-number\fB\fR ] [ \fB+d\fR ] [ \fB+s\fR ] [ \fB+u\fR ] [ \fB\fIfile...\fB\fR ] |
| 13 |
|
| 14 |
.SH "DESCRIPTION" |
| 15 |
.PP |
| 16 |
\fBmost\fR is a paging program that displays, one windowful at a time, |
| 17 |
the contents of a file on a terminal. It pauses after each |
| 18 |
windowful and prints on the window status line the screen the file |
| 19 |
name, current line number, and the percentage of the file so far |
| 20 |
displayed. |
| 21 |
.PP |
| 22 |
Unlike other paging programs, \fBmost\fR is capable of displaying an |
| 23 |
arbitrary number of windows as long as each window occupies at least |
| 24 |
two screen lines. Each window may contain the same file or a |
| 25 |
different file. In addition, each window has its own mode. For |
| 26 |
example, one window may display a file with its lines wrapped while |
| 27 |
another may be truncating the lines. Windows may be `locked' |
| 28 |
together in the sense that if one of the locked windows scrolls, all |
| 29 |
locked windows will scroll. \fBmost\fR is also capable of ignoring lines |
| 30 |
that are indented beyond a user specified value. This is useful |
| 31 |
when viewing computer programs to pick out gross features of the |
| 32 |
code. See the `:o' command for a description of this feature. |
| 33 |
.PP |
| 34 |
In addition to displaying ordinary text files, \fBmost\fR can also |
| 35 |
display binary files as well as files with arbitrary ascii |
| 36 |
characters. When a file is read into a buffer, \fBmost\fR examines the |
| 37 |
first 32 bytes of the file to determine if the file is a binary file |
| 38 |
and then switches to the appropriate mode. However, this feature |
| 39 |
may be disabled with the -k option. See the description of the -b, |
| 40 |
-k, -v, and -t options for further details. |
| 41 |
.PP |
| 42 |
Text files may contain combinations of underscore and backspace |
| 43 |
characters causing a printer to underline or overstrike. When \fBmost\fR |
| 44 |
recognizes this, it inserts the appropriate escape sequences to |
| 45 |
achieve the desired effect. In addition, some files cause the |
| 46 |
printer to overstrike some characters by embedding carriage return |
| 47 |
characters in the middle of a line. When this occurs, \fBmost\fR displays |
| 48 |
the overstruck character with a bold attribute. This feature |
| 49 |
facilitates the reading of UNIX man pages or a document produced by |
| 50 |
runoff. In particular, viewing this document with \fBmost\fR should |
| 51 |
illustrate this behavior provided that the underline characters |
| 52 |
have not been stripped. This may be turned off with the -v option. |
| 53 |
.PP |
| 54 |
By default, lines with more characters than the terminal width are |
| 55 |
not wrapped but are instead truncated. When truncation occurs, this |
| 56 |
is indicated by a `$' in the far right column of the terminal |
| 57 |
screen. The RIGHT and LEFT arrow keys may be used to view lines |
| 58 |
which extend past the margins of the screen. The -w option may be |
| 59 |
used to override this feature. When a window is wrapped, the |
| 60 |
character `\\' will appear at the right edge of the window. |
| 61 |
.PP |
| 62 |
Commands are listed below. |
| 63 |
.SH "COLOR SUPPORT" |
| 64 |
.PP |
| 65 |
\fBmost\fR has supported both 256-color and 24 bit truecolor terminals |
| 66 |
since version 5.2. Not all terminals are capable of generating |
| 67 |
arbitrary 24 bit colors. If your terminal supports 24 bit colors, |
| 68 |
but \fBmost\fR does not detect it, then set the environment variable |
| 69 |
|
| 70 |
.nf |
| 71 |
COLORTERM=truecolor |
| 72 |
.fi |
| 73 |
.PP |
| 74 |
to force 24 bit truecolors to be used. |
| 75 |
.PP |
| 76 |
.SH "OPTIONS" |
| 77 |
.TP |
| 78 |
\fB-1\fR |
| 79 |
VT100 mode. This is meaningful only |
| 80 |
on VMS systems. This option should be used if the terminal is |
| 81 |
strictly a VT100. This implies that the terminal does not have the |
| 82 |
ability to delete and insert multiple lines. VT102s and above have |
| 83 |
this ability. |
| 84 |
.TP |
| 85 |
\fB-b\fR |
| 86 |
Binary mode. Use this switch when |
| 87 |
you want to view files containing 8 bit characters. \fBmost\fR will |
| 88 |
display the file 16 bytes per line in hexadecimal notation. A |
| 89 |
typical line looks like: |
| 90 |
|
| 91 |
.nf |
| 92 |
01000000 40001575 9C23A020 4000168D [email protected].#. @... |
| 93 |
.fi |
| 94 |
|
| 95 |
When used with the -v option, the same line looks like: |
| 96 |
|
| 97 |
.nf |
| 98 |
^A^@^@^@ @^@^U u 9C #A0 @^@^V8D [email protected].#. @... |
| 99 |
.fi |
| 100 |
.TP |
| 101 |
\fB-C\fR |
| 102 |
Disable color support. |
| 103 |
.TP |
| 104 |
\fB-c\fR |
| 105 |
Make searches case-sensitive |
| 106 |
.TP |
| 107 |
\fB-d\fR |
| 108 |
Omit the backslash mark used to denote a wrapped line. |
| 109 |
.TP |
| 110 |
\fB-M\fR |
| 111 |
Disable the use of mmap. |
| 112 |
.TP |
| 113 |
\fB-r\fR |
| 114 |
Default to using regexp searches |
| 115 |
.TP |
| 116 |
\fB-s\fR |
| 117 |
Squeeze-mode. Replace multiple blank |
| 118 |
lines with a single blank line. |
| 119 |
.TP |
| 120 |
\fB-t\fR |
| 121 |
Display tabs as ^I. If this option |
| 122 |
is immediately followed by an integer, the integer sets the tab |
| 123 |
width, e.g., -t4 |
| 124 |
.TP |
| 125 |
\fB-u\fR |
| 126 |
Disable UTF-8 mode even if the |
| 127 |
locale dictates it |
| 128 |
.TP |
| 129 |
\fB+u\fR |
| 130 |
Force UTF-8 mode. By default \fBmost\fR |
| 131 |
will use the current locale to determine if UTF-8 mode should be |
| 132 |
used. The +u and -u switches allow the behavior to be overridden |
| 133 |
.TP |
| 134 |
\fB-v\fR |
| 135 |
Display control characters as in |
| 136 |
`^A' for control A. Normally \fBmost\fR does not interpret control |
| 137 |
characters. |
| 138 |
.TP |
| 139 |
\fB-w\fR |
| 140 |
Wrap lines |
| 141 |
.TP |
| 142 |
\fB-z\fR |
| 143 |
Disable gunzip-on-the-fly |
| 144 |
.TP |
| 145 |
\fB+/\fIstring\fB\fR |
| 146 |
Start up at the |
| 147 |
line containing the first occurrence of string |
| 148 |
.TP |
| 149 |
\fB+\fIlineno\fB\fR |
| 150 |
Start up at the |
| 151 |
specified line-number |
| 152 |
.TP |
| 153 |
\fB+d\fR |
| 154 |
This switch should only be used if |
| 155 |
you want the option to delete a file while viewing it. This makes |
| 156 |
it easier to clean unwanted files out of a directory. The file is |
| 157 |
deleted with the interactive key sequence `:D' and then confirming |
| 158 |
with `y'. |
| 159 |
.TP |
| 160 |
\fB+s\fR |
| 161 |
Secure Mode-- no edit, cd, shell, |
| 162 |
and reading files not already listed on the command line. |
| 163 |
.SH "COMMAND USAGE" |
| 164 |
.PP |
| 165 |
The commands take effect immediately; it is not necessary to type a |
| 166 |
carriage return. In the following commands, \fBi\fR is a numerical |
| 167 |
argument (1 by default). |
| 168 |
.TP |
| 169 |
\fBSPACE, CTRL-D, NEXT_SCREEN\fR |
| 170 |
Display another windowful, or jump \fBi\fR windowfuls if \fBi\fR is specified. |
| 171 |
.TP |
| 172 |
\fBRETURN, DOWN_ARROW, V, CTRL-N\fR |
| 173 |
Display another line, or \fBi\fR more lines, if specified. |
| 174 |
.TP |
| 175 |
\fBUP_ARROW, ^, CTRL-P\fR |
| 176 |
Display previous line, or \fBi\fR previous |
| 177 |
lines, if specified. |
| 178 |
.TP |
| 179 |
\fBT, ESCAPE<\fR |
| 180 |
Move to top of buffer. |
| 181 |
.TP |
| 182 |
\fBB, ESCAPE>\fR |
| 183 |
Move to bottom of buffer. |
| 184 |
.TP |
| 185 |
\fBRIGHT_ARROW, TAB, >\fR |
| 186 |
Scroll window left 60\fBi\fR columns to view |
| 187 |
lines that are beyond the right margin of the window. |
| 188 |
.TP |
| 189 |
\fBLEFT_ARROW, CTRL-B, <\fR |
| 190 |
Scroll window right 60\fBi\fR columns to |
| 191 |
view lines that are beyond the left margin of the window. |
| 192 |
.TP |
| 193 |
\fBU, CTRL-U, DELETE, PREV_SCREEN\fR |
| 194 |
Skip back \fBi\fR windowfuls and |
| 195 |
then print a windowful. |
| 196 |
.TP |
| 197 |
\fBR, CTRL-R\fR |
| 198 |
Redraw the window. |
| 199 |
.TP |
| 200 |
\fBJ, G\fR |
| 201 |
If \fBi\fR is not specified, then prompt for a line |
| 202 |
number then jump to that line otherwise just jump to line i. |
| 203 |
.TP |
| 204 |
\fB%\fR |
| 205 |
If \fBi\fR is not specified, then prompt for a percent number |
| 206 |
then jump to that percent of the file otherwise just jump to \fBi\fR percent |
| 207 |
of the file. |
| 208 |
.TP |
| 209 |
\fBW, w\fR |
| 210 |
If the current screen width is 80, make it 132 and |
| 211 |
vice-versa. For other values, this command is ignored. |
| 212 |
.TP |
| 213 |
\fBQ, CTRL-X CTRL-C, CTRL-K E\fR |
| 214 |
Exit from \fBmost\fR\&. On VMS, ^Z also |
| 215 |
exits. |
| 216 |
.TP |
| 217 |
\fBh, CTRL-H, HELP, PF2\fR |
| 218 |
Help. Give a description of all the |
| 219 |
\fBmost\fR commands. The \fBmost\fR environment variable MOST_HELP must be set |
| 220 |
for this to be meaningful. |
| 221 |
.TP |
| 222 |
\fBf, /, CTRL-F, FIND, GOLD PF3\fR |
| 223 |
Prompt for a string and |
| 224 |
search forward from the current line for ith distinct line containing |
| 225 |
the string. CTRL-G aborts. |
| 226 |
.TP |
| 227 |
\fB?\fR |
| 228 |
Prompt for a string and search backward for the ith |
| 229 |
distinct line containing the string. CTRL-G aborts. |
| 230 |
.TP |
| 231 |
\fBn\fR |
| 232 |
Search for the next \fBi\fR lines containing an occurrence of |
| 233 |
the last search string in the direction of the previous search. |
| 234 |
.TP |
| 235 |
\fBm, SELECT, CTRL-@, CTRL-K M, PERIOD\fR |
| 236 |
Set a mark on the |
| 237 |
current line for later reference. |
| 238 |
.TP |
| 239 |
\fBINSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD\fR |
| 240 |
Set a mark on the current line but return to previous mark. |
| 241 |
This allows the user to toggle back and forth between two positions in |
| 242 |
the file. |
| 243 |
.TP |
| 244 |
\fBl, L\fR |
| 245 |
Toggle locking for this window. The window is locked |
| 246 |
if there is a `*' at the left edge of the status line. Windows locked |
| 247 |
together, scroll together. |
| 248 |
.TP |
| 249 |
\fBCTRL-X 2, CTRL-W 2, GOLD X\fR |
| 250 |
Split this window in half. |
| 251 |
.TP |
| 252 |
\fBCTRL-X o, CTRL-W o, o, GOLDUP, GOLDDOWN\fR |
| 253 |
Move to other window. |
| 254 |
.TP |
| 255 |
\fBCTRL-X 0, CTRL-W 0, GOLD V\fR |
| 256 |
Delete this window. |
| 257 |
.TP |
| 258 |
\fBCTRL-X 1, CTRL-W 1, GOLD O\fR |
| 259 |
Delete all other windows, leaving |
| 260 |
only one window. |
| 261 |
.TP |
| 262 |
\fBE, e\fR |
| 263 |
Edit this file. |
| 264 |
.TP |
| 265 |
\fB$, ESC $\fR |
| 266 |
This is system dependent. On VMS, this causes \fBmost\fR |
| 267 |
to spawn a subprocess. When the user exits the process, \fBmost\fR is |
| 268 |
resumed. On UNIX systems, \fBmost\fR simply suspends itself. |
| 269 |
.TP |
| 270 |
\fB:n\fR |
| 271 |
Skip to the next filename given in the command line. Use |
| 272 |
the arrow keys to scroll forward or backward through the file list. |
| 273 |
`Q' quits \fBmost\fR and any other key selects the given file. |
| 274 |
.TP |
| 275 |
\fB:c\fR |
| 276 |
Toggle case sensitive search. |
| 277 |
.TP |
| 278 |
\fB:D\fR |
| 279 |
Delete current file. This command is only meaningful |
| 280 |
with the +d switch. |
| 281 |
.TP |
| 282 |
\fB:o, :O\fR |
| 283 |
Toggle various options. With this key sequence, \fBmost\fR |
| 284 |
displays a prompt asking the user to hit one of: bdtvw. The `b', `t', |
| 285 |
`v', and `w' options have the same meaning as the command line |
| 286 |
switches. For example, the `w' option will toggle wrapping on and off |
| 287 |
for the current window. |
| 288 |
|
| 289 |
The `d' option must be used with a prefix integer i. All lines |
| 290 |
indented beyond \fBi\fR columns will not be displayed. For example, |
| 291 |
consider the fragment: |
| 292 |
.TP |
| 293 |
\fB\fR |
| 294 |
|
| 295 |
.nf |
| 296 |
int main(int argc, char **argv) |
| 297 |
{ |
| 298 |
int i; |
| 299 |
for (i = 0; i < argc, i++) |
| 300 |
{ |
| 301 |
fprintf(stdout,"%i: %s\\n",i,argv[i]); |
| 302 |
} |
| 303 |
return 0; |
| 304 |
} |
| 305 |
.fi |
| 306 |
The key sequence `1:od' will cause \fBmost\fR to display the file ignoring |
| 307 |
all lines indented beyond the first column. So for the example above, |
| 308 |
\fBmost\fR would display: |
| 309 |
|
| 310 |
.nf |
| 311 |
int main(int argc, char **argv)... |
| 312 |
} |
| 313 |
.fi |
| 314 |
where the `...' indicates lines that follow are not displayed. |
| 315 |
.SH "HINTS" |
| 316 |
.PP |
| 317 |
CTRL-G aborts the commands requiring the user to type something in |
| 318 |
at a prompt. The back-quote key has a special meaning here. It is |
| 319 |
used to quote certain characters. This is useful when search for |
| 320 |
the occurrence of a string with a control character or a string at |
| 321 |
the beginning of a line. In the latter case, to find the occurrence |
| 322 |
of `The' at the beginning of a line, enter `^JThe where ` quotes the |
| 323 |
CTRL-J. |
| 324 |
.SH "ENVIRONMENT" |
| 325 |
.PP |
| 326 |
\fBmost\fR uses the following environment variables: |
| 327 |
.TP |
| 328 |
\fBMOST_SWITCHES\fR |
| 329 |
This variable sets commonly used switches. |
| 330 |
For example, some people prefer to use \fBmost\fR with the -s option so that |
| 331 |
excess blank lines are not displayed. On VMS this is normally done |
| 332 |
done in the login.com through the line: |
| 333 |
.TP |
| 334 |
\fB\fR |
| 335 |
|
| 336 |
.nf |
| 337 |
$ define MOST_SWITCHES "-s" |
| 338 |
.fi |
| 339 |
.TP |
| 340 |
\fBMOST_EDITOR, SLANG_EDITOR\fR |
| 341 |
Either of these environment |
| 342 |
variables specify an editor for \fBmost\fR to invoke to edit a file. The |
| 343 |
value can contain %s and %d formatting descriptors that represent the |
| 344 |
file name and line number, respectively. For example, if JED is |
| 345 |
your editor, then set MOST_EDITOR to 'jed %s -g %d'. |
| 346 |
.TP |
| 347 |
\fBMOST_HELP\fR |
| 348 |
This variable may be used to specify an alternate |
| 349 |
help file. |
| 350 |
.TP |
| 351 |
\fBMOST_INITFILE\fR |
| 352 |
Set this variable to specify the |
| 353 |
initialization file to load during startup. The default action is to |
| 354 |
load the system configuration file and then a personal configuration |
| 355 |
file called .mostrc on Unix, and most.rc on other systems. |
| 356 |
.SH "CONFIGURATION FILE SYNTAX" |
| 357 |
.PP |
| 358 |
When \fBmost\fR starts up, it tries to read a system configuration file and |
| 359 |
then a personal configuration file. These files may be used to specify |
| 360 |
key-bindings and colors. |
| 361 |
.PP |
| 362 |
To bind a key to a particular function use the syntax: |
| 363 |
|
| 364 |
.nf |
| 365 |
setkey function-name key-sequence |
| 366 |
.fi |
| 367 |
.PP |
| 368 |
The setkey command requires two arguments. The function-name argument |
| 369 |
specifies the function that is to be executed as a response to the |
| 370 |
keys specified by the key-sequence argument are pressed. For example, |
| 371 |
|
| 372 |
.nf |
| 373 |
setkey "up" "^P" |
| 374 |
.fi |
| 375 |
.PP |
| 376 |
indicates that when Ctrl-P is pressed then the function up is to be executed. |
| 377 |
.PP |
| 378 |
Sometimes, it is necessary to first unbind a key-sequence before |
| 379 |
rebinding it in order via the unsetkey function: |
| 380 |
|
| 381 |
.nf |
| 382 |
unsetkey "^F" |
| 383 |
.fi |
| 384 |
.PP |
| 385 |
Colors may be defined through the use of the color keyword in the the |
| 386 |
configuration file using the syntax: |
| 387 |
|
| 388 |
.nf |
| 389 |
color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR |
| 390 |
.fi |
| 391 |
.PP |
| 392 |
Here, OBJECT-NAME can be any one of the following items: |
| 393 |
|
| 394 |
.nf |
| 395 |
status -- the status line |
| 396 |
underline -- underlined text |
| 397 |
overstrike -- overstruck text |
| 398 |
normal -- anything else |
| 399 |
.fi |
| 400 |
.PP |
| 401 |
See the sample configuration files for more information. |
| 402 |
.SH "BUGS" |
| 403 |
.PP |
| 404 |
Almost all of the known bugs or limitations of \fBmost\fR are due to a |
| 405 |
desire to read and interpret control characters in files. One |
| 406 |
problem concerns the use of backspace characters to underscore or |
| 407 |
overstrike other characters. \fBmost\fR makes an attempt to use terminal |
| 408 |
escape sequences to simulate this behavior. One side effect is the |
| 409 |
one does not always get what one expects when scrolling right and left |
| 410 |
through a file. When in doubt, use the -v and -b options of \fBmost\fR\&. |
| 411 |
.PP |
| 412 |
The regular-expression searches may fail to find strings that involve |
| 413 |
backspace/underscore used for highlighting. The regular-expression |
| 414 |
syntax is described in the S-Lang Library documentation. |
| 415 |
.SH "AUTHOR" |
| 416 |
.PP |
| 417 |
John E. Davis <[email protected]> |
| 418 |
.SH "ACKNOWLEDGEMENTS" |
| 419 |
.PP |
| 420 |
Over the years, many people have contributed to \fBmost\fR in one way or |
| 421 |
another, e.g., via code patches, bug-fixes, comments, or criticisms. |
| 422 |
I am particularly grateful to the very early adopters of the program |
| 423 |
who took a chance with a fledgling software project headed by someone |
| 424 |
learning the underlying language. These include: |
| 425 |
.PP |
| 426 |
Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark Pizzolato |
| 427 |
contributed to the early VMS versions of \fBmost\fR\&. In particular, Mark |
| 428 |
worked on it to get it ready for DECUS. |
| 429 |
.PP |
| 430 |
Foteos Macrides adapted \fBmost\fR for use in cswing and gopher. A few |
| 431 |
features of the present version of \fBmost\fR was inspired from his work. |
| 432 |
.PP |
| 433 |
I am grateful to Robert Mills for re-writing the search routines to |
| 434 |
use regular expressions. |
| 435 |
.PP |
| 436 |
Sven Oliver Moll came up with the idea of automatic detection of |
| 437 |
zipped files. |
| 438 |
.PP |
| 439 |
I would also like to thank Shinichi Hama for his valuable criticisms |
| 440 |
of \fBmost\fR\&. |
| 441 |
.PP |
| 442 |
Javier Kohen was instrumental in the support for UTF-8. |
| 443 |
.PP |
| 444 |
Thanks to David W. Sanderson for adapting the early documentation to |
| 445 |
nroff man page source format. |