OpenClaw 白皮书
openclaw completion
生成 shell 补全脚本,并可选地将其安装到你的 shell 配置文件中。
用法
bashopenclaw completion openclaw completion --shell zsh openclaw completion --install openclaw completion --shell fish --install openclaw completion --write-state openclaw completion --shell bash --write-state
选项
- ✦
-s, --shell <shell>:目标 shell(zsh、bash、powershell、fish;默认:zsh) - ✦
-i, --install:通过在 shell 配置文件中添加 source 行来安装补全 - ✦
--write-state:将补全脚本写入$OPENCLAW_STATE_DIR/completions,不输出到标准输出 - ✦
-y, --yes:跳过安装确认提示
注意事项
- ✦
--install会在你的 shell 配置文件中写入一个小的 "OpenClaw Completion" 块,并将其指向缓存的脚本。 - ✦不使用
--install或--write-state时,命令会将脚本输出到标准输出。 - ✦补全生成会预加载命令树,以便包含嵌套的子命令。