diff --git a/plugins/laravel-homestead/laravel-homestead.plugin.zsh b/plugins/laravel-homestead/laravel-homestead.plugin.zsh new file mode 100644 index 000000000..0540a1a05 --- /dev/null +++ b/plugins/laravel-homestead/laravel-homestead.plugin.zsh @@ -0,0 +1,16 @@ +########################################### +# Laravel homestead command completion # +# Author: Casper Lai # +# Email: casper.lai@outlook.com # +# Reference: Laravel5 plugin # +########################################### + +_laravel_homestead_get_command_list () { + homestead --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' +} + +_laravel_homestead () { + compadd `_laravel_homestead_get_command_list` +} + +compdef _laravel_homestead homestead \ No newline at end of file