fixed and formatted laravel completion and used helper function
parent
3ed0063fa6
commit
c9e977d1c3
|
|
@ -1,14 +1,9 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
if command -v laravel > /dev/null; then
|
||||
if _command_exists laravel; then
|
||||
__laravel_completion() {
|
||||
local OPTS=("-h --help -q --quiet --ansi --no-ansi -n --no-interaction -v -vv -vvv --verbose help list new")
|
||||
COMPREPLY=()
|
||||
for _opt_ in ${OPTS[@]}; do
|
||||
if [[ "$_opt_" == "$2"* ]]; then
|
||||
COMPREPLY+=("$_opt_")
|
||||
fi
|
||||
done
|
||||
local curr=$(_get_cword)
|
||||
COMPREPLY=($(compgen -W "list --raw --format -h --help -q --quiet -V --version --ansi --no-ansi -n --no-interaction -v -vv -vvv --verbose" -- "$curr"))
|
||||
}
|
||||
|
||||
complete -F __laravel_completion laravel
|
||||
|
|
|
|||
Loading…
Reference in New Issue