Skip to content

Commit

Permalink
Added the Laravel 4 artisan completion plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbing committed Oct 9, 2013
1 parent c79e5a9 commit 62bee9a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions plugins/laravel4/laravel4.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Laravel 4: Artisan basic command completion

_laravel4_get_command_list () {
php artisan | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
}

_laravel4 () {
if [ -f artisan ]; then
compadd `_laravel4_get_command_list`
fi
}

compdef _laravel4 php artisan
compdef _laravel4 artisan

#Alias
alias artisan='php artisan'
alias artisan2cl='php artisan cache:clear'
alias artisan2routes='php artisan routes'

2 comments on commit 62bee9a

@sorbing
Copy link
Owner Author

@sorbing sorbing commented on 62bee9a Oct 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin for Command Completion in Laravel 4 (artisan console). Example:
Screenshot a completion command in Laravel 4

@SebSept
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.