1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

refactor(plugins): remove old generated completion files

This removes .gitignore plugin files and adds a force-rm of the old completion file,
which ignores any errors if the file doesn't exist.
This commit is contained in:
Marc Cornellà 2021-09-15 18:47:51 +02:00
parent d2269180b0
commit eb2eacaf0c
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
10 changed files with 16 additions and 6 deletions

View file

@ -1 +0,0 @@
_cargo

View file

@ -1,4 +1,8 @@
if (( $+commands[rustup] && $+commands[cargo] )); then
# remove old generated completion file
command rm -f "${0:A:h}/_cargo"
# generate new completion file
ver="$(cargo --version)"
ver_file="$ZSH_CACHE_DIR/cargo_version"
comp_file="$ZSH_CACHE_DIR/completions/_cargo"

View file

@ -1 +0,0 @@
_deno

View file

@ -12,6 +12,9 @@ alias dup='deno upgrade'
# COMPLETION FUNCTION
if (( $+commands[deno] )); then
# remove old generated completion file
command rm -f "${0:A:h}/_deno"
ver="$(deno --version)"
ver_file="$ZSH_CACHE_DIR/deno_version"
comp_file="$ZSH_CACHE_DIR/completions/_deno"

View file

@ -1,2 +0,0 @@
_fnm

View file

@ -1,4 +1,7 @@
if (( $+commands[fnm] )); then
# remove old generated completion file
command rm -f "${0:A:h}/_fnm"
ver="$(fnm --version)"
ver_file="$ZSH_CACHE_DIR/fnm_version"
comp_file="$ZSH_CACHE_DIR/completions/_fnm"

View file

@ -1 +0,0 @@
_gh

View file

@ -1,5 +1,8 @@
# Autocompletion for the GitHub CLI (gh).
if (( $+commands[gh] )); then
# remove old generated completion file
command rm -f "${0:A:h}/_gh"
ver="$(gh --version)"
ver_file="$ZSH_CACHE_DIR/gh_version"
comp_file="$ZSH_CACHE_DIR/completions/_gh"

View file

@ -1 +0,0 @@
_rustup

View file

@ -1,4 +1,7 @@
if (( $+commands[rustup] )); then
# remove old generated completion file
command rm -f "${0:A:h}/_rustup"
ver="$(rustup --version 2>/dev/null)"
ver_file="$ZSH_CACHE_DIR/rustup_version"
comp_file="$ZSH_CACHE_DIR/completions/_rustup"