From 812efaab90cb31ac7541be88c888cad33c832ac8 Mon Sep 17 00:00:00 2001 From: Gurkirat Singh Date: Sun, 10 Jan 2021 00:54:41 +0530 Subject: [PATCH] added vuejs completion in clean_files --- clean_files.txt | 1 + completion/available/vuejs.completion.bash | 89 +++++++++++----------- 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/clean_files.txt b/clean_files.txt index f94b2dca..ef02239f 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -53,6 +53,7 @@ completion/available/pipx.completion.bash completion/available/rustup.completion.bash completion/available/vault.completion.bash completion/available/sdkman.completion.bash +completion/available/vuejs.completion.bash # aliases # diff --git a/completion/available/vuejs.completion.bash b/completion/available/vuejs.completion.bash index 78c277db..ebd46b28 100644 --- a/completion/available/vuejs.completion.bash +++ b/completion/available/vuejs.completion.bash @@ -1,49 +1,50 @@ -#!/usr/bin/bash +# shellcheck shell=bash +# shellcheck disable=SC2207 if _command_exists vue; then - __vuejs_completion() { - local prev=$(_get_pword) - local curr=$(_get_cword) + __vuejs_completion() { + local prev=$(_get_pword) + local curr=$(_get_cword) - case $prev in - create) - COMPREPLY=($(compgen -W "-p -d -i -m -r -g -n -f -c -x -b -h --help --preset --default --inilinePreset --packageManager --registry --git --no-git --force --merge --clone --proxy --bare --skipGetStarted" -- "$curr")) - ;; - add|invoke) - COMPREPLY=($(compgen -W "--registry -h --help" -- "$curr")) - ;; - inspect) - COMPREPLY=($(compgen -W "-v --help --verbose --mode --rule --plugin --plugins --rules" -- "$curr")) - ;; - serve) - COMPREPLY=($(compgen -W "-o -h --help --open -c --copy -p --port" -- "$curr")) - ;; - build) - COMPREPLY=($(compgen -W "-t --target -n --name -d --dest -h --help" -- "$curr")) - ;; - ui) - COMPREPLY=($(compgen -W "-H --host -p --port -D --dev --quiet --headless -h --help" -- "$curr")) - ;; - init) - COMPREPLY=($(compgen -W "-c --clone --offline -h --help" -- "$curr")) - ;; - config) - COMPREPLY=($(compgen -W "-g --get -s --set -d --delete -e --edit --json -h --help" -- "$curr")) - ;; - outdated) - COMPREPLY=($(compgen -W "--next -h --help" -- "$curr")) - ;; - upgrade) - COMPREPLY=($(compgen -W "-t --to -f --from -r --registry --all --next -h --help" -- "$curr")) - ;; - migrate) - COMPREPLY=($(compgen -W "-f --from -h --help" -- "$curr")) - ;; - *) - COMPREPLY=($(compgen -W "-h --help -v --version create add invoke inspect serve build ui init config outdated upgrade migrate info" -- "$curr")) - ;; - esac - } + case $prev in + create) + COMPREPLY=($(compgen -W "-p -d -i -m -r -g -n -f -c -x -b -h --help --preset --default --inilinePreset --packageManager --registry --git --no-git --force --merge --clone --proxy --bare --skipGetStarted" -- "$curr")) + ;; + add | invoke) + COMPREPLY=($(compgen -W "--registry -h --help" -- "$curr")) + ;; + inspect) + COMPREPLY=($(compgen -W "-v --help --verbose --mode --rule --plugin --plugins --rules" -- "$curr")) + ;; + serve) + COMPREPLY=($(compgen -W "-o -h --help --open -c --copy -p --port" -- "$curr")) + ;; + build) + COMPREPLY=($(compgen -W "-t --target -n --name -d --dest -h --help" -- "$curr")) + ;; + ui) + COMPREPLY=($(compgen -W "-H --host -p --port -D --dev --quiet --headless -h --help" -- "$curr")) + ;; + init) + COMPREPLY=($(compgen -W "-c --clone --offline -h --help" -- "$curr")) + ;; + config) + COMPREPLY=($(compgen -W "-g --get -s --set -d --delete -e --edit --json -h --help" -- "$curr")) + ;; + outdated) + COMPREPLY=($(compgen -W "--next -h --help" -- "$curr")) + ;; + upgrade) + COMPREPLY=($(compgen -W "-t --to -f --from -r --registry --all --next -h --help" -- "$curr")) + ;; + migrate) + COMPREPLY=($(compgen -W "-f --from -h --help" -- "$curr")) + ;; + *) + COMPREPLY=($(compgen -W "-h --help -v --version create add invoke inspect serve build ui init config outdated upgrade migrate info" -- "$curr")) + ;; + esac + } - complete -F __vuejs_completion vue + complete -F __vuejs_completion vue fi