completions/laravel: use `_command_exists`

Addresses bash-it/bash-it#1632
pull/1938/head
John D Pell 2021-09-19 10:16:54 -07:00
parent e2915df1e5
commit 8e169388d2
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,9 @@
#!/usr/bin/bash
if command -v laravel > /dev/null; then
__laravel_completion() {
if _command_exists laravel
then
function __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