跳到正文
cccskills
免费在 GitHub 公开

bat

Use this skill when the user wants to view files with syntax highlighting, read code with color formatting, or use a better alternative to cat.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli星标 56(GitHub 56 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md2.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

bat Plugin

A cat(1) clone with syntax highlighting, git integration, automatic paging, and support for showing non-printable characters.

Commands

File Viewing

  • bat file view — View file with syntax highlighting

Utility

  • bat _ _ — Passthrough to bat CLI

Usage Examples

  • "View this file with syntax highlighting"
  • "Read the code with colors"
  • "Show me the contents of this file"
  • "Display file with line numbers"

Installation

brew install bat

Or via Cargo:

cargo install bat

Examples

# View file with syntax highlighting
bat file view main.py

# View multiple files
bat file view main.py src/utils.js

# Specify language for syntax highlighting
bat file view --language rust file.txt

# Show line numbers
bat file view --number main.py

# Show specific line range
bat file view --line-range 10:20 main.py

# Set output style (auto, full, plain, changes)
bat file view --style plain main.py

# Set color mode (auto, never, always)
bat file view --color never main.py

# Control paging (auto, never, always)
bat file view --paging never main.py

# Control text wrapping (auto, never, character)
bat file view --wrap never main.py

# Set syntax highlighting theme
bat file view --theme Monokai main.py

# Show non-printable characters
bat file view --show-all main.py

# Read from stdin
echo "hello" | bat file view -

# Any bat command with passthrough
bat _ _ --line-range 1:50 main.py
bat _ _ --style changes --number main.py

Key Features

  • Syntax highlighting — Automatic detection for 200+ languages
  • Git integration — Show git diff for modified lines
  • Automatic paging — Page large files automatically
  • Line numbers — Optional line number display
  • File concatenation — View multiple files like cat
  • Non-printable characters — Show special characters
  • Themes — Customizable syntax highlighting themes
  • Output styles — Full, plain, changes, or auto
  • Color control — Enable/disable colors
  • Text wrapping — Control text wrapping behavior
  • Pipeline support — Read from stdin

Notes

  • Automatically detects file type for syntax highlighting
  • Uses less as pager by default
  • Can be configured as git pager
  • Supports custom themes and syntaxes
  • Configuration file at ~/.config/bat/config

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill when the user wants to use 100-exercises-to-learn-rust.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

2to3

免费

Use this skill when the user wants to use 2to3, cli tool: 2to3.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

2to3-2.7

免费

Use this skill when the user wants to use 2to3-2.7, cli tool: 2to3-2.7.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

2to3-3.11

免费

Use this skill when the user wants to use 2to3-3.11, cli tool: 2to3-3.11.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

411toppm

免费

Use this skill when the user wants to use 411toppm, cli tool: 411toppm.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

53AIHub

免费

Use this skill when the user wants to use 53AIHub.

中文简介正在准备中。当前显示原文说明。

javimosch/supercli562026年10月30日 更新

查看 javimosch 的全部技能

报告此技能的问题