Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
875e7c40
Unverified
Commit
875e7c40
authored
Dec 28, 2021
by
(╯°□°)╯︵ uᴉǝssnH ɐɟɐʇsoW
Committed by
GitHub
Dec 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(helm): cache completion file in the background (#8326)
parent
6515850a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
helm.plugin.zsh
plugins/helm/helm.plugin.zsh
+20
-5
No files found.
plugins/helm/helm.plugin.zsh
View file @
875e7c40
# Autocompletion for helm.
#
# Copy from kubectl : https://github.com/pstadler
if
((
!
$+
commands[helm]
))
;
then
return
fi
# TODO: 2021-12-28: delete this block
# Remove old generated file
command rm
-f
"
${
ZSH_CACHE_DIR
}
/helm_completion"
if
[
$commands
[
helm]
]
;
then
source
<
(
helm completion zsh
)
# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
# Add completions folder in $ZSH_CACHE_DIR
command mkdir
-p
"
$ZSH_CACHE_DIR
/completions"
((
${
fpath
[(Ie)
"
$ZSH_CACHE_DIR
/completions"
]
}
))
||
fpath
=(
"
$ZSH_CACHE_DIR
/completions"
$fpath
)
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `helm`. Otherwise, compinit will have already done that.
if
[[
!
-f
"
$ZSH_CACHE_DIR
/completions/_helm"
]]
;
then
declare
-A
_comps
autoload
-Uz
_helm
_comps[helm]
=
_helm
fi
helm completion zsh
>
|
"
$ZSH_CACHE_DIR
/completions/_helm"
&|
Write
Preview
Markdown
is supported
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