ChatZLE
将 zsh/ZLE 风格的命令行编辑功能引入 Minecraft 聊天窗口。
仅客户端使用。 ChatZLE 用于改进 Minecraft 聊天和 /commands 的编辑体验。它不会启动 zsh、打开终端或在你的电脑上执行命令。
ChatZLE 为 Minecraft 带来了持久的命令历史记录、内联自动建议、模糊反向搜索以及熟悉的 zsh/ZLE 风格编辑快捷键。
功能特性
- 内联历史自动建议,按前缀、频率和最近使用情况进行排序
- 持久化命令历史记录,默认情况下去重并按服务器分隔存储
- 模糊反向搜索,使用
Ctrl-R 触发
- 基于前缀的历史记录导航,使用
Up 和 Down 键
- 受 ZLE 启发的编辑功能,支持字符和单词的移动
- 剪贴板(Kill ring)、粘贴(Yank)和循环粘贴(Yank-pop)
- 最后参数插入,使用
Alt-.
- 命令缩写,例如
/gms → /gamemode survival
- 敏感命令过滤,针对常见的登录、密码、令牌和认证命令进行保护
- 完全兼容原版 Brigadier 语法高亮和命令建议
- 无需在服务器端安装
原版补全兼容性
当原版的 Brigadier 补全弹出框打开时,ChatZLE 的历史建议仍然可见。
Tab、Up 和 Down 继续控制原版补全
Right 或 End 接受完整的 ChatZLE 历史建议
Alt-Right 仅接受 ChatZLE 建议中的下一个单词
这样,即使原版正在建议当前命令的参数,整行历史补全功能依然可用。
主要快捷键
| 快捷键 |
操作 |
Right / End |
接受完整内联建议 |
Alt-Right |
接受下一个建议单词 |
Up / Down |
导航匹配当前前缀的历史记录 |
Ctrl-R |
打开模糊反向历史搜索 / 选择下一个结果 |
Ctrl-S |
选择上一个反向搜索结果 |
Enter / Right |
接受选定的搜索结果 |
Esc / Ctrl-G |
取消反向搜索 |
Ctrl-A / Ctrl-E |
移动到行首/行尾 |
Ctrl-B / Ctrl-F |
向后/向前移动一个字符 |
Alt-B / Alt-F |
向后/向前移动一个单词 |
Ctrl-W |
删除前一个单词 |
Ctrl-U / Ctrl-K |
删除至行首/行尾 |
Alt-D |
删除下一个单词 |
Ctrl-Y / Alt-Y |
粘贴 / 循环粘贴 |
Ctrl-T / Alt-T |
交换字符 / 单词位置 |
Alt-. |
插入历史记录中的最后一个参数 |
在 macOS 上,ZLE 动作使用物理 Control 键。标准的 Minecraft Command 键快捷键继续正常工作。
客户端命令
/chatzle — 显示当前状态
/chatzle help — 显示紧凑的快捷键参考
/chatzle toggle|enable|disable — 在不重启的情况下控制 ChatZLE
/chatzle reload — 重新加载配置和历史记录
/chatzle history stats|clear — 检查或清除保存的历史记录
/chatzle abbr list|add|remove — 管理命令缩写
示例:
/chatzle abbr add gms /gamemode survival
随后输入 /gms 会自动扩展为 /gamemode survival 。
依赖要求
| 组件 |
版本 |
| Minecraft |
1.21.11 |
| Fabric Loader |
0.18.4 或更高版本 |
| Fabric API |
适用于 Minecraft 1.21.11 的版本 |
| Fabric Language Kotlin |
1.13.9+kotlin.2.3.10 或更高版本 |
| Java |
21 |
将 ChatZLE 安装到客户端的 mods 目录中。请勿安装在服务器上。
隐私
配置和历史记录本地存储在以下位置:
config/chatzle/config.json
config/chatzle/history.json
ChatZLE 不会传输你的命令历史记录。
默认情况下,常见的凭据类命令会被排除在持久历史记录之外。这是一种尽力而为的安全措施,无法保证检测到所有敏感命令。
链接
ChatZLE
Bring zsh/ZLE-style command-line editing to Minecraft chat.
Client-side only. ChatZLE improves editing for Minecraft chat and /commands. It does not start zsh, open a terminal, or execute commands on your computer.
ChatZLE adds persistent command history, inline autosuggestions, fuzzy reverse search, and familiar zsh/ZLE-inspired editing shortcuts to Minecraft.
Features
- Inline history autosuggestions ranked by prefix, frequency, and recency
- Persistent command history, deduplicated and separated by server by default
- Fuzzy reverse search with
Ctrl-R
- Prefix-aware history navigation with
Up and Down
- ZLE-inspired editing for character and word movement
- Kill ring, yank, and yank-pop
- Last-argument insertion with
Alt-.
- Command abbreviations, such as
/gms → /gamemode survival
- Sensitive-command filtering for common login, password, token, and authentication commands
- Full compatibility with vanilla Brigadier syntax highlighting and command suggestions
- No server-side installation required
Vanilla Completion Compatibility
ChatZLE history suggestions can remain visible while the vanilla Brigadier completion popup is open.
Tab, Up, and Down continue to control vanilla completions
Right or End accepts the complete ChatZLE history suggestion
Alt-Right accepts only the next word from the ChatZLE suggestion
This keeps full-line history completion available even while vanilla is suggesting the current command argument.
Main Shortcuts
| Shortcut |
Action |
Right / End |
Accept the complete inline suggestion |
Alt-Right |
Accept the next suggested word |
Up / Down |
Navigate history matching the current prefix |
Ctrl-R |
Open fuzzy reverse history search / select the next result |
Ctrl-S |
Select the previous reverse-search result |
Enter / Right |
Accept the selected search result |
Esc / Ctrl-G |
Cancel reverse search |
Ctrl-A / Ctrl-E |
Move to the beginning/end of the line |
Ctrl-B / Ctrl-F |
Move backward/forward one character |
Alt-B / Alt-F |
Move backward/forward one word |
Ctrl-W |
Kill the previous word |
Ctrl-U / Ctrl-K |
Kill to the beginning/end of the line |
Alt-D |
Kill the next word |
Ctrl-Y / Alt-Y |
Yank / yank-pop |
Ctrl-T / Alt-T |
Transpose characters / words |
Alt-. |
Insert the last argument from history |
On macOS, ZLE actions use the physical Control key. Standard Minecraft Command-key shortcuts continue to work normally.
Client Commands
/chatzle — show the current status
/chatzle help — show a compact shortcut reference
/chatzle toggle|enable|disable — control ChatZLE without restarting
/chatzle reload — reload configuration and history
/chatzle history stats|clear — inspect or clear saved history
/chatzle abbr list|add|remove — manage command abbreviations
Example:
/chatzle abbr add gms /gamemode survival
Typing /gms afterwards expands it to /gamemode survival .
Requirements
| Component |
Version |
| Minecraft |
1.21.11 |
| Fabric Loader |
0.18.4 or newer |
| Fabric API |
A build for Minecraft 1.21.11 |
| Fabric Language Kotlin |
1.13.9+kotlin.2.3.10 or newer |
| Java |
21 |
Install ChatZLE in the client's mods directory. Do not install it on the server.
Privacy
Configuration and history are stored locally in:
config/chatzle/config.json
config/chatzle/history.json
ChatZLE does not transmit your command history.
Common credential-like commands are excluded from persistent history by default. This is a best-effort safeguard and cannot guarantee that every sensitive command will be detected.
Links
评论 0
登录后参与评分
还没有评论,来抢沙发吧