Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

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:通过向你的 shell 配置文件添加一行 source 语句来安装补全
  • --write-state:将补全脚本写入 $OPENCLAW_STATE_DIR/completions,而不打印到 stdout
  • -y, --yes:跳过安装确认提示

说明

  • --install 会在你的 shell 配置文件中写入一个小型的 “OpenClaw Completion” 区块,并将其指向已缓存的脚本。
  • 不使用 --install--write-state 时,该命令会将脚本打印到 stdout。
  • 补全生成会预先加载命令树,因此会包含嵌套子命令。

相关内容