Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

Environment variables can be referenced using $XXX syntax, where XXX represents the name of the environment variable. For example:

  • $PATH - References the PATH environment variable
  • $HOME - References the HOME environment variable
  • $USER - References the current user’s username

This syntax is commonly used in shell scripts and configuration files to access system-level environment variables.

Color Configuration

NO_COLOR

When set to a non-empty value, disables all colored output regardless of the -C flag. This follows the NO_COLOR standard.

# Disable colored output
NO_COLOR=1 mq -C '.h' README.md

MQ_COLORS

Customizes the colors used when -C (color output) is enabled. The format is a colon-separated list of key=value pairs, where each value is a semicolon-separated list of SGR (Select Graphic Rendition) parameters.

# Make headings bold red, code blocks blue
export MQ_COLORS="heading=1;31:code=34"
mq -C '.h' README.md

Only the specified keys are overridden; unspecified keys use the default colors. Invalid entries are silently ignored.

Available Keys

KeyDescriptionDefault
headingHeadings (#, ##, etc.)bold cyan (1;36)
codeFenced code blocksgreen (32)
code_inlineInline codegreen (32)
emphasisItalic text (*text*)italic yellow (3;33)
strongBold text (**text**)bold (1)
linkLinks ([text](url))underline blue (4;34)
link_urlLink URLsblue (34)
imageImages (![alt](url))magenta (35)
blockquoteBlockquote markers (>)dim (2)
deleteStrikethrough (~~text~~)red dim (31;2)
hrHorizontal rules (---)dim (2)
htmlInline HTMLdim (2)
frontmatterYAML/TOML frontmatterdim (2)
listList markers (-, *, 1.)yellow (33)
tableTable separatorsdim (2)
mathMath expressions ($...$)green (32)

Common SGR Codes

CodeEffect
0Reset
1Bold
2Dim
3Italic
4Underline
31Red
32Green
33Yellow
34Blue
35Magenta
36Cyan
37White