Skip to content

Instantly share code, notes, and snippets.

@GeeH
Created April 24, 2020 12:18
Show Gist options
  • Save GeeH/2d9a6edc05cd4420e5cc851d2a16f182 to your computer and use it in GitHub Desktop.
Save GeeH/2d9a6edc05cd4420e5cc851d2a16f182 to your computer and use it in GitHub Desktop.
_artisan()
{
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
return 0
}
complete -F _artisan art
complete -F _artisan artisan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment