openclaw completion
生成 shell 补全脚本并可选择安装到你的 shell 配置文件中。
用法
openclaw 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 配置文件添加源行来安装补全--write-state:将补全脚本写入$OPENCLAW_STATE_DIR/completions而非打印到 stdout-y, --yes:跳过安装确认提示
注意
--install向你的 shell 配置文件写入一个小的”OpenClaw Completion”块,并指向缓存的脚本。- 没有
--install或--write-state时,命令将脚本打印到 stdout。 - 补全生成会急切地加载命令树,以便包含嵌套的子命令。