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(zshbashpowershellfish;默认:zsh
  • -i, --install:将补全脚本的 source 行添加到你的 shell 配置文件中
  • --write-state:将补全脚本写入 $OPENCLAW_STATE_DIR/completions,不输出到标准输出
  • -y, --yes:跳过安装确认提示

注意事项

  • --install 会在你的 shell 配置文件中写入一小段 “OpenClaw Completion” 代码块,指向缓存的脚本。
  • 不带 --install--write-state 时,命令会把脚本打印到标准输出。
  • 补全生成会预加载命令树,确保嵌套子命令也被包含在内。