3f214329d631b3ae39d6b283262c77819a0078de

Author
Carlo Sala <carlosalag@protonmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

chore: removing old completion code (#10616)

Diff

  1diff --git a/plugins/cargo/cargo.plugin.zsh b/plugins/cargo/cargo.plugin.zsh
  2index e4b338207429106b0110ac4d548c6659a588e361..692025e8f4feba24a9512f917480dda97c8d955c 100644
  3--- a/plugins/cargo/cargo.plugin.zsh
  4+++ b/plugins/cargo/cargo.plugin.zsh
  5@@ -1,14 +1,6 @@
  6 print ${(%):-'%F{yellow}The `cargo` plugin is deprecated and has been moved to the `rust` plugin.'}
  7 print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'}
  8 
  9-# TODO: 2021-12-28: remove this block
 10-# Handle $0 according to the standard:
 11-# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
 12-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
 13-0="${${(M)0:#/*}:-$PWD/$0}"
 14-# Remove old generated completion file
 15-command rm -f "${0:A:h}/_cargo" "$ZSH_CACHE_DIR/cargo_version"
 16-
 17 (( ${fpath[(Ie)$ZSH/plugins/rust]} )) || {
 18   fpath=("$ZSH/plugins/rust" $fpath)
 19   source "$ZSH/plugins/rust/rust.plugin.zsh"
 20diff --git a/plugins/deno/deno.plugin.zsh b/plugins/deno/deno.plugin.zsh
 21index 6c12bae13c3ed67c28a7bcd24678455901ffee59..7708f84df038802d0086a3d44fda22a6c0778e10 100644
 22--- a/plugins/deno/deno.plugin.zsh
 23+++ b/plugins/deno/deno.plugin.zsh
 24@@ -16,19 +16,6 @@ if (( ! $+commands[deno] )); then
 25   return
 26 fi
 27 
 28-# TODO: 2021-12-28: remove this block
 29-# Handle $0 according to the standard:
 30-# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
 31-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
 32-0="${${(M)0:#/*}:-$PWD/$0}"
 33-# Remove old generated files
 34-command rm -f "${0:A:h}/_deno" "$ZSH_CACHE_DIR/deno_version"
 35-
 36-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
 37-# Add completions folder in $ZSH_CACHE_DIR
 38-command mkdir -p "$ZSH_CACHE_DIR/completions"
 39-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
 40-
 41 # If the completion file doesn't exist yet, we need to autoload it and
 42 # bind it to `deno`. Otherwise, compinit will have already done that.
 43 if [[ ! -f "$ZSH_CACHE_DIR/completions/_deno" ]]; then
 44diff --git a/plugins/fnm/fnm.plugin.zsh b/plugins/fnm/fnm.plugin.zsh
 45index 044e16a0425d9850c83b1e3f944583ddc9a8e04a..6219025cdcc60b976abd68ad4251009d0f588eb4 100644
 46--- a/plugins/fnm/fnm.plugin.zsh
 47+++ b/plugins/fnm/fnm.plugin.zsh
 48@@ -2,19 +2,6 @@ if (( ! $+commands[fnm] )); then
 49   return
 50 fi
 51 
 52-# TODO: 2021-12-28: remove this block
 53-# Handle $0 according to the standard:
 54-# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
 55-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
 56-0="${${(M)0:#/*}:-$PWD/$0}"
 57-# remove old generated files
 58-command rm -f "${0:A:h}/_fnm" "$ZSH_CACHE_DIR/fnm_version"
 59-
 60-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
 61-# Add completions folder in $ZSH_CACHE_DIR
 62-command mkdir -p "$ZSH_CACHE_DIR/completions"
 63-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
 64-
 65 # If the completion file doesn't exist yet, we need to autoload it and
 66 # bind it to `fnm`. Otherwise, compinit will have already done that.
 67 if [[ ! -f "$ZSH_CACHE_DIR/completions/_fnm" ]]; then
 68diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh
 69index 9263220caa11e357dbb8517993c940046e5fca20..1d8d84c558068d9ac9588466705bf5d2f493201e 100644
 70--- a/plugins/gh/gh.plugin.zsh
 71+++ b/plugins/gh/gh.plugin.zsh
 72@@ -3,19 +3,6 @@ if (( ! $+commands[gh] )); then
 73   return
 74 fi
 75 
 76-# TODO: 2021-12-28: remove this block
 77-# Handle $0 according to the standard:
 78-# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
 79-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
 80-0="${${(M)0:#/*}:-$PWD/$0}"
 81-# Remove old generated files
 82-command rm -f "${0:A:h}/_gh" "$ZSH_CACHE_DIR/gh_version"
 83-
 84-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
 85-# Add completions folder in $ZSH_CACHE_DIR
 86-command mkdir -p "$ZSH_CACHE_DIR/completions"
 87-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
 88-
 89 # If the completion file doesn't exist yet, we need to autoload it and
 90 # bind it to `gh`. Otherwise, compinit will have already done that.
 91 if [[ ! -f "$ZSH_CACHE_DIR/completions/_gh" ]]; then
 92diff --git a/plugins/helm/helm.plugin.zsh b/plugins/helm/helm.plugin.zsh
 93index 05bb19a44ff17c646596cee13571edf2649346c7..151c43d887b2fd6dd896cbe5957b0788cfb9cf42 100644
 94--- a/plugins/helm/helm.plugin.zsh
 95+++ b/plugins/helm/helm.plugin.zsh
 96@@ -2,15 +2,6 @@ if (( ! $+commands[helm] )); then
 97   return
 98 fi
 99 
100-# TODO: 2021-12-28: delete this block
101-# Remove old generated file
102-command rm -f "${ZSH_CACHE_DIR}/helm_completion"
103-
104-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
105-# Add completions folder in $ZSH_CACHE_DIR
106-command mkdir -p "$ZSH_CACHE_DIR/completions"
107-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
108-
109 # If the completion file does not exist, generate it and then source it
110 # Otherwise, source it and regenerate in the background
111 if [[ ! -f "$ZSH_CACHE_DIR/completions/_helm" ]]; then
112diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
113index 0ee252ac3cbf65556d5a30383d39463d1503300a..095d2b3281abc9cde3f5f60320ad24ff2c530167 100644
114--- a/plugins/kubectl/kubectl.plugin.zsh
115+++ b/plugins/kubectl/kubectl.plugin.zsh
116@@ -1,13 +1,4 @@
117 if (( $+commands[kubectl] )); then
118-  # TODO: 2022-01-05: remove this block
119-  # remove old generated files
120-  command rm -f "$ZSH_CACHE_DIR/kubectl_completion"
121-
122-  # TODO: 2022-01-05: remove this bit of code as it exists in oh-my-zsh.sh
123-  # Add completions folder in $ZSH_CACHE_DIR
124-  command mkdir -p "$ZSH_CACHE_DIR/completions"
125-  (( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
126-
127   # If the completion file does not exist, generate it and then source it
128   # Otherwise, source it and regenerate in the background
129   if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then
130diff --git a/plugins/rbw/rbw.plugin.zsh b/plugins/rbw/rbw.plugin.zsh
131index 523e35affe8385cd4e4a37ff8779da5d2bc9552d..b6cecf8b4ec759ef8475a791c3457d7ad7e1d25c 100644
132--- a/plugins/rbw/rbw.plugin.zsh
133+++ b/plugins/rbw/rbw.plugin.zsh
134@@ -2,12 +2,6 @@ if (( ! $+commands[rbw] )); then
135   return
136 fi
137 
138-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
139-# Add completions folder in $ZSH_CACHE_DIR
140-command mkdir -p "$ZSH_CACHE_DIR/completions"
141-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
142-
143-
144 # If the completion file doesn't exist yet, we need to autoload it and
145 # bind it to `rbw`. Otherwise, compinit will have already done that.
146 if [[ ! -f "$ZSH_CACHE_DIR/completions/_rbw" ]]; then
147diff --git a/plugins/rust/rust.plugin.zsh b/plugins/rust/rust.plugin.zsh
148index db6ca9e7449ab4bc5c7313d4e40fc030848f302a..858f14126ffd96594d9244ec14c582c332ea6743 100644
149--- a/plugins/rust/rust.plugin.zsh
150+++ b/plugins/rust/rust.plugin.zsh
151@@ -2,11 +2,6 @@ if ! (( $+commands[rustup] && $+commands[cargo] )); then
152   return
153 fi
154 
155-# Add completions folder in $ZSH_CACHE_DIR
156-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
157-command mkdir -p "$ZSH_CACHE_DIR/completions"
158-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
159-
160 # If the completion file doesn't exist yet, we need to autoload it and
161 # bind it to `cargo`. Otherwise, compinit will have already done that
162 if [[ ! -f "$ZSH_CACHE_DIR/completions/_cargo" ]]; then
163diff --git a/plugins/rustup/rustup.plugin.zsh b/plugins/rustup/rustup.plugin.zsh
164index 3d59c1c54604c4ddfd0b3c4dacf98855c8d7634e..ef141cf8fdaaf37c5b9458b07a8ff2c4f8d5de05 100644
165--- a/plugins/rustup/rustup.plugin.zsh
166+++ b/plugins/rustup/rustup.plugin.zsh
167@@ -1,14 +1,6 @@
168 print ${(%):-'%F{yellow}The `rustup` plugin is deprecated and has been moved to the `rust` plugin.'}
169 print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'}
170 
171-# TODO: 2021-12-28: remove this block
172-# Handle $0 according to the standard:
173-# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
174-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
175-0="${${(M)0:#/*}:-$PWD/$0}"
176-# Remove old generated completion file
177-command rm -f "${0:A:h}/_rustup" "$ZSH_CACHE_DIR/rustup_version"
178-
179 (( ${fpath[(Ie)$ZSH/plugins/rust]} )) || {
180   fpath=("$ZSH/plugins/rust" $fpath)
181   source "$ZSH/plugins/rust/rust.plugin.zsh"
182diff --git a/plugins/volta/volta.plugin.zsh b/plugins/volta/volta.plugin.zsh
183index 79319394c329bf5ba3fc934118149d945827e31f..ab05ed5df7e1c47dfc0992b3b59afd8dbf693b70 100644
184--- a/plugins/volta/volta.plugin.zsh
185+++ b/plugins/volta/volta.plugin.zsh
186@@ -3,11 +3,6 @@ if (( ! $+commands[volta] )); then
187   return
188 fi
189 
190-# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh
191-# Add completions folder in $ZSH_CACHE_DIR
192-command mkdir -p "$ZSH_CACHE_DIR/completions"
193-(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)
194-
195 # If the completion file doesn't exist yet, we need to autoload it and
196 # bind it to `deno`. Otherwise, compinit will have already done that.
197 if [[ ! -f "$ZSH_CACHE_DIR/completions/_volta" ]]; then