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:將 source 行加入 shell 設定檔以安裝自動補全--write-state:將自動補全腳本寫入$OPENCLAW_STATE_DIR/completions,不輸出至 stdout-y, --yes:跳過安裝確認提示
注意事項
--install會在 shell 設定檔中寫入一小段「OpenClaw Completion」區塊,並指向快取的腳本。- 不使用
--install或--write-state時,指令會將腳本印至 stdout。 - 自動補全產生時會急切載入指令樹,以包含巢狀子指令。