【mac】/Users/xxx/.openclaw/completions/openclaw.zsh:3803: command not found: compdef

一、问题

    安装完openclaw之后,打开终端报错:/Users/xxx/.openclaw/completions/openclaw.zsh:3803: command not found: compdef

 

二、解决办法

1、编辑~/.zshrc文件

 vim ~/.zshrc

 

2、添加补全命令:

autoload -Uz compinit && compinit
. "$HOME/.local/bin/env"

autoload -Uz compinit && compinit

# OpenClaw Completion
source "/Users/fabu/.openclaw/completions/openclaw.zsh"

 

3、重新生效~/.zshrc配置

source ~/.zshrc

posted @ 2026-03-02 10:25  代码诠释的世界  阅读(1030)  评论(0)    收藏  举报