mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[zsh] Generate kubectl completions
This commit is contained in:
parent
688848fa5b
commit
dd46d9d935
1 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,15 @@ _plugin project 'https://git.sr.ht/~keanucode/scripts/blob/master/project/projec
|
|||
unset bw_comp_path
|
||||
fi; unset bw_bin
|
||||
|
||||
if kctl_bin="$(command_locate kubectl)" && [[ -n "$kctl_bin" ]]; then
|
||||
kctl_comp_path="${ZSH_CACHE_DIR}/site-functions/_kubectl"
|
||||
if [[ "$kctl_bin" -nt "$kctl_comp_path" || ! -s "$kctl_comp_path" ]]; then
|
||||
_perf_timer_start "generate kubectl completions"
|
||||
"$kctl_bin" completion zsh >| "$kctl_comp_path"
|
||||
_perf_timer_stop "generate kubectl completions"
|
||||
fi
|
||||
fi; unset kctl_comp_path
|
||||
|
||||
_plugin nim-compl 'https://raw.githubusercontent.com/nim-lang/Nim/devel/tools/nim.zsh-completion' from=url \
|
||||
after_load='plugin-cfg-path fpath prepend ""'
|
||||
|
||||
|
|
Loading…
Reference in a new issue