繁体   English   中英

不知道在哪里放置 Oh My Zsh 的补全

[英]Not sure where to put completions with Oh My Zsh

我正在使用 zsh 和我的 zsh,我对将完成文件放在哪里有点困惑。

例如,在安装kind时,我这样做:

brew install kind
kind complete zsh > ~/.oh-my-zsh/cache/completions/_kind

我希望kind的完成会开始工作。 我是否将它们放在错误的目录中?

如果我在当前终端中执行autoload -U compinit && compinit ,则完成工作直到我重新启动终端。

我认为我的.zshrc非常标准,这基本上就是我所拥有的:

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

export ZSH="$HOME/.oh-my-zsh"

DISABLE_MAGIC_FUNCTIONS="true"

plugins=(
  git
  gh
  docker
  docker-compose
  kubectl
  helm
  dotnet
  node
  npm
  github
  zsh-syntax-highlighting
  zsh-autosuggestions
  history-substring-search
  terraform)
autoload -U compinit && compinit

source $ZSH/oh-my-zsh.sh

autoload -U compinit && compinit必须在我获取我的 zsh之后发生吗? 如果是这样,为什么? 🤔

您是否尝试过将完成不在缓存目录中。

kind complete zsh > ~/.oh-my-zsh/completions/_kind

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM