tmux 集成
自 v0.10 起可用
使用 tmux 子命令,可以直接从运行中的 tmux 会话提取画面或历史记录并转换为 SVG。
在 tmux 会话中打开另一个窗口或窗格,也可以从外部 shell 运行。
console2svg tmux capture -o tmux-current.svg未指定 --target 时,会显示选择要捕获窗格的菜单。
样式选项的指定方式与 capture 模式相同。
console2svg tmux capture -d macos-pc -t github-dark -o tmux-current.svg指定窗格(--target)
Section titled “指定窗格(--target)”使用 --target 指定目标窗格标识符。
# 指定窗口 0 的窗格 1console2svg tmux capture -o pane1.svg --target ":0.1"获取历史记录(--history)
Section titled “获取历史记录(--history)”如需同时捕获之前的输出,请用 --history 指定获取的行数。
# 生成包含之前 100 行历史记录的捕获结果console2svg tmux capture -o long-log.svg --history 100不带参数时,会包含所有可获取的历史记录。
console2svg tmux capture -o full-log.svg --historytmux live-server
Section titled “tmux live-server”也可以针对 tmux 窗格使用 live-server 功能。其参数与 live-server 相同。
console2svg tmux live-server