[英]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.