Skip to content

Instantly share code, notes, and snippets.

@emctoo
Last active January 16, 2016 05:59
Show Gist options
  • Save emctoo/93b252c35f0e5b4888d5 to your computer and use it in GitHub Desktop.
Save emctoo/93b252c35f0e5b4888d5 to your computer and use it in GitHub Desktop.
complete 13 command not found compdef

zsh 登录时 complete 13 command not found compdef 问题

问题描述

只有登录时候出现, 登录后后开启terminal没有出现, 此时which compdef也工作正常

解决方案

安装nvm时, 需要在~/.zprofile中添加 source ource /usr/share/nvm/init-nvm.sh, 就是这一行出的问题, 注释掉就可以了.

原因

init-nvm.sh

export NVM_DIR="$HOME/.nvm"
source /usr/share/nvm/nvm.sh
source /usr/share/nvm/bash_completion

nvm 是shell实现的(不知道是不是zsh, 但是zsh对bash是兼容的), 补全也是对bash的,会不会是这个问题?

Linux Shell进化简史 查看arch的zsh wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment