Skip to content

Commit 62bee9a

Browse files
committed
Added the Laravel 4 artisan completion plugin
1 parent c79e5a9 commit 62bee9a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Laravel 4: Artisan basic command completion
2+
3+
_laravel4_get_command_list () {
4+
php artisan | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
5+
}
6+
7+
_laravel4 () {
8+
if [ -f artisan ]; then
9+
compadd `_laravel4_get_command_list`
10+
fi
11+
}
12+
13+
compdef _laravel4 php artisan
14+
compdef _laravel4 artisan
15+
16+
#Alias
17+
alias artisan='php artisan'
18+
alias artisan2cl='php artisan cache:clear'
19+
alias artisan2routes='php artisan routes'

0 commit comments

Comments
 (0)