# info > mhl

---
type: CommandReference
command: mhl
mode: man
section: 1mh
source: man-pages
---

## Quick Reference

- `mhl` — read from stdin, output formatted message listing
- `mhl file1 file2` — display multiple messages with prompts
- `mhl -form myformat` — use custom format file
- `mhl -length 50 -width 100` — set screen dimensions
- `mhl -folder +inbox` — specify folder for message name
- `mhl -moreproc less` — use specific pager program
- `mhl -fmtproc filter` — run body through format filter
- `mhl -bell -clear` — ring bell and clear screen per page

## Name

mhl — produce formatted listings of nmh messages

## Synopsis

`/usr/lib/mh/mhl` [`-help`] [`-version`] [`-bell` | `-nobell`] [`-clear` | `-noclear`] [`-folder +folder`] [`-form formfile`] [`-length lines`] [`-width columns`] [`-moreproc program`] [`-nomoreproc`] [`-fmtproc program`] [`-nofmtproc`] [`files ...`]

## Options

- `-help` — display help and exit
- `-version` — show version and exit
- `-bell`, `-nobell` — ring terminal bell at end of each page (default: `-bell`)
- `-clear`, `-noclear` — clear screen at end of each page (default: `-noclear`); if output is not a terminal, send formfeed
- `-folder +folder` — set nmh folder name for `messagename:` field (default from `$mhfolder`)
- `-form formfile` — use alternate format file (default: `mhl.format` in nmh directory or `/etc/nmh/mhl.format`)
- `-length lines` — set screen length (default: 40)
- `-width columns` — set screen width (default: 80)
- `-moreproc program` — override interactive front-end program (default from profile `moreproc`); `-nomoreproc` disables
- `-fmtproc program` — override format filter program (default from profile `formatproc`); `-nofmtproc` disables

### Format File Variables

Each line of the format file can define global or component-specific variables. Variables marked `G` apply globally, `L` locally.

- `width` (integer) — screen width or component width
- `length` (integer) — screen length or component length
- `offset` (integer) — positions to indent `component: `
- `overflowtext` (string) — text at beginning of overflow line (default `"***"`)
- `overflowoffset` (integer) — positions to indent overflow lines
- `compwidth` (integer) — positions to indent component text after first line
- `uppercase` / `nouppercase` (flag) — output component text in uppercase
- `clearscreen` / `noclearscreen` (flag/G) — clear screen before each page
- `bell` / `nobell` (flag/G) — ring bell at end of each page
- `component` (string) — name to use instead of `component:` for this component
- `nocomponent` (flag) — suppress `component:` output
- `center` / `nocenter` (flag) — center component on line (one-line only)
- `leftadjust` / `noleftadjust` (flag) — strip leading whitespace on each line
- `rtrim` / `nortrim` (flag) — trim trailing whitespace
- `compress` / `nocompress` (flag) — change newlines to spaces
- `wrap` / `nowrap` (flag) — wrap lines exceeding width (default: wrap)
- `split` / `nosplit` (flag) — combine multiple fields into one
- `newline` / `nonewline` (flag) — print newline after component (default: newline)
- `formatfield` (string) — format string using `mh-format(5)` escapes
- `decode` (flag) — decode RFC 2047 encoded header fields
- `addrfield` (flag) — field contains addresses (for formatfield)
- `datefield` (flag) — field contains dates (for formatfield)
- `format` / `noformat` (flag) — run component through formatproc filter (body only)
- `formatarg` (string) — argument to format filter; processed by `mh-format(5)`

Special components: `MessageName` (outputs message filename with folder), `Extras` (outputs unmatched components).  
`ignores=component,...` specifies components never output.

## See Also

[show(1)](http://localhost/phpMan.php/man/show/1/markdown), [ap(8)](http://localhost/phpMan.php/man/ap/8/markdown), [dp(8)](http://localhost/phpMan.php/man/dp/8/markdown), [mh-format(5)](http://localhost/phpMan.php/man/mh-format/5/markdown), [mh-mail(5)](http://localhost/phpMan.php/man/mh-mail/5/markdown)

## Exit Codes

None documented.