Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
oh-my-zsh
Commits
2956e782
Commit
2956e782
authored
May 20, 2018
by
Lorenzo Bolla
Browse files
Fix 6843 Cache kubectl completion script to file to speed up sourcing
parent
a600ab4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/kubectl/kubectl.plugin.zsh
View file @
2956e782
...
...
@@ -2,8 +2,15 @@
#
# Author: https://github.com/pstadler
KUBECTL_COMPLETION_FILENAME
=
"
$TMPPREFIX
-kubectl-completion-zsh"
if
[[
!
-f
"
$KUBECTL_COMPLETION_FILENAME
"
]]
then
kubectl completion zsh
>
"
$KUBECTL_COMPLETION_FILENAME
"
fi
if
[
$commands
[
kubectl]
]
;
then
source
<
(
kubectl completion zsh
)
source
"
$KUBECTL_COMPLETION_FILENAME
"
fi
# This command is used ALOT both below and in daily life
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment