added vuejs completion in clean_files

pull/1780/head
Gurkirat Singh 2021-01-10 00:54:41 +05:30 committed by Noah Gorny
parent 2a2741d761
commit 812efaab90
2 changed files with 46 additions and 44 deletions

View File

@ -53,6 +53,7 @@ completion/available/pipx.completion.bash
completion/available/rustup.completion.bash completion/available/rustup.completion.bash
completion/available/vault.completion.bash completion/available/vault.completion.bash
completion/available/sdkman.completion.bash completion/available/sdkman.completion.bash
completion/available/vuejs.completion.bash
# aliases # aliases
# #

View File

@ -1,49 +1,50 @@
#!/usr/bin/bash # shellcheck shell=bash
# shellcheck disable=SC2207
if _command_exists vue; then if _command_exists vue; then
__vuejs_completion() { __vuejs_completion() {
local prev=$(_get_pword) local prev=$(_get_pword)
local curr=$(_get_cword) local curr=$(_get_cword)
case $prev in case $prev in
create) 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")) 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) add | invoke)
COMPREPLY=($(compgen -W "--registry -h --help" -- "$curr")) COMPREPLY=($(compgen -W "--registry -h --help" -- "$curr"))
;; ;;
inspect) inspect)
COMPREPLY=($(compgen -W "-v --help --verbose --mode --rule --plugin --plugins --rules" -- "$curr")) COMPREPLY=($(compgen -W "-v --help --verbose --mode --rule --plugin --plugins --rules" -- "$curr"))
;; ;;
serve) serve)
COMPREPLY=($(compgen -W "-o -h --help --open -c --copy -p --port" -- "$curr")) COMPREPLY=($(compgen -W "-o -h --help --open -c --copy -p --port" -- "$curr"))
;; ;;
build) build)
COMPREPLY=($(compgen -W "-t --target -n --name -d --dest -h --help" -- "$curr")) COMPREPLY=($(compgen -W "-t --target -n --name -d --dest -h --help" -- "$curr"))
;; ;;
ui) ui)
COMPREPLY=($(compgen -W "-H --host -p --port -D --dev --quiet --headless -h --help" -- "$curr")) COMPREPLY=($(compgen -W "-H --host -p --port -D --dev --quiet --headless -h --help" -- "$curr"))
;; ;;
init) init)
COMPREPLY=($(compgen -W "-c --clone --offline -h --help" -- "$curr")) COMPREPLY=($(compgen -W "-c --clone --offline -h --help" -- "$curr"))
;; ;;
config) config)
COMPREPLY=($(compgen -W "-g --get -s --set -d --delete -e --edit --json -h --help" -- "$curr")) COMPREPLY=($(compgen -W "-g --get -s --set -d --delete -e --edit --json -h --help" -- "$curr"))
;; ;;
outdated) outdated)
COMPREPLY=($(compgen -W "--next -h --help" -- "$curr")) COMPREPLY=($(compgen -W "--next -h --help" -- "$curr"))
;; ;;
upgrade) upgrade)
COMPREPLY=($(compgen -W "-t --to -f --from -r --registry --all --next -h --help" -- "$curr")) COMPREPLY=($(compgen -W "-t --to -f --from -r --registry --all --next -h --help" -- "$curr"))
;; ;;
migrate) migrate)
COMPREPLY=($(compgen -W "-f --from -h --help" -- "$curr")) 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")) COMPREPLY=($(compgen -W "-h --help -v --version create add invoke inspect serve build ui init config outdated upgrade migrate info" -- "$curr"))
;; ;;
esac esac
} }
complete -F __vuejs_completion vue complete -F __vuejs_completion vue
fi fi