1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-04-10 16:32:00 +00:00
Files
ohmyzsh-mirror/plugins/kn/kn.plugin.zsh
2026-04-02 23:47:55 +02:00

18 lines
463 B
Bash

# Autocompletion for kn, the command line interface for Knative.
#
# Author: https://github.com/btannous
if (( ! $+commands[kn] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `kn`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kn" ]]; then
typeset -g -A _comps
autoload -Uz _kn
_comps[kn]=_kn
fi
kn completion zsh >| "$ZSH_CACHE_DIR/completions/_kn" &|