← 返回命令列表

Linux command

mdcat 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Render a Markdown file

mdcat [path/to/file.md]

Render Markdown from stdin

echo "# Hello" | mdcat

Paginate output

mdcat -p [path/to/file.md]

说明

mdcat renders Markdown documents directly in the terminal with syntax highlighting for code blocks (via syntect), inline images in supported terminals, clickable links, and jump marks for headings in iTerm2. It works best with iTerm2, WezTerm, and kitty, and supports most modern terminal emulators including Windows Terminal and anything based on VTE. If no files are specified, it reads from stdin.

参数

-p, --paginate
Paginate output through a pager.
--no-colour
Disable syntax highlighting and colours.

FAQ

What is the mdcat command used for?

mdcat renders Markdown documents directly in the terminal with syntax highlighting for code blocks (via syntect), inline images in supported terminals, clickable links, and jump marks for headings in iTerm2. It works best with iTerm2, WezTerm, and kitty, and supports most modern terminal emulators including Windows Terminal and anything based on VTE. If no files are specified, it reads from stdin.

How do I run a basic mdcat example?

Run `mdcat [path/to/file.md]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p, --paginate do in mdcat?

Paginate output through a pager.