Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint/vue completions #1780

Merged
merged 2 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
102 changes: 56 additions & 46 deletions completion/available/vuejs.completion.bash
Original file line number Diff line number Diff line change
@@ -1,49 +1,59 @@
#!/usr/bin/bash
# shellcheck shell=bash

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)
# shellcheck disable=SC2207
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)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "--registry -h --help" -- "$curr"))
;;
inspect)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-v --help --verbose --mode --rule --plugin --plugins --rules" -- "$curr"))
;;
serve)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-o -h --help --open -c --copy -p --port" -- "$curr"))
;;
build)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-t --target -n --name -d --dest -h --help" -- "$curr"))
;;
ui)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-H --host -p --port -D --dev --quiet --headless -h --help" -- "$curr"))
;;
init)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-c --clone --offline -h --help" -- "$curr"))
;;
config)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-g --get -s --set -d --delete -e --edit --json -h --help" -- "$curr"))
;;
outdated)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "--next -h --help" -- "$curr"))
;;
upgrade)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-t --to -f --from -r --registry --all --next -h --help" -- "$curr"))
;;
migrate)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "-f --from -h --help" -- "$curr"))
;;
*)
# shellcheck disable=SC2207
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
fi
complete -F __vuejs_completion vue