Reference
Environment variables
Configuration, pager, editor and terminal color environment settings.
Variables
MDV_CONFIG_PATH
Custom path to a configuration directory; also used by mdv --init-config when no directory is provided.
MDV_EDITOR
Editor command used by the document browser and built-in pager; takes priority over EDITOR.
- Known GUI editors launch asynchronously while terminal editors block until exit; Emacs and Vim modes are selected from their CLI arguments.
- Unknown commands are treated as terminal editors.
- Malformed commands and non-Unicode editor settings are reported as errors.
MDV_EDITOR_MODE
Optional editor launch mode: tui waits for the editor to exit, while gui launches it asynchronously.
- When unset, the mode is detected automatically.
- Explicit
tuimay be used with GUI launchers to pause the pager; explicitguioverrides unknown commands but is rejected for known terminal editors to prevent both processes from controlling the same terminal. - Invalid values and conflicts are reported in the pager without launching the editor.
MDV_PAGER
Pager command, optionally with quoted paths and arguments (for example, less -R).
- It selects the backend for
--pager,mdv help, and documents opened from the interactive browser, but does not enable paging for ordinary output by itself. - An explicit
--pager=<COMMAND>has higher priority;defaultselects the default backend (currently built-inminus), whilebuiltinexplicitly selectsminus. - Empty, malformed, non-Unicode, and recursive
mdvcommands are errors. - Commands are split into a program and arguments and run directly without shell interpretation.
MDV_COLOR
Sets auto, always, or never; an explicit --color has higher priority.