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