![](/img/trans.png)
[英]For Oh-My-ZSH, where do I put UNIX commands I want to executed when a new instance is started
[英]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.