mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-05 06:38:58 +01:00
refactor(laravel): consolidate versioned plugins (#14282)
* refactor(laravel): consolidate versioned plugins * fix(laravel): scope legacy aliases and defer command discovery
This commit is contained in:
1 parent
924db8c81b
commit
aa9ca00520
8 files changed
+280
-67
No files matched your search
@@ -1,19 +1,15 @@
|
||||
# Alias
|
||||
alias la5='php artisan'
|
||||
alias la5cache='php artisan cache:clear'
|
||||
alias la5routes='php artisan route:list'
|
||||
alias la5vendor='php artisan vendor:publish'
|
||||
print -Pru2 -- \
|
||||
'%F{yellow}[oh-my-zsh] The %Blaravel5%b plugin is deprecated.' \
|
||||
'Use %Blaravel%b instead.%f'
|
||||
|
||||
# Laravel5 basic command completion
|
||||
_laravel5_get_command_list () {
|
||||
php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
|
||||
}
|
||||
source "${0:A:h:h}/laravel/laravel.plugin.zsh"
|
||||
|
||||
_laravel5 () {
|
||||
if [[ -f artisan ]]; then
|
||||
compadd $(_laravel5_get_command_list)
|
||||
fi
|
||||
}
|
||||
# Keep compatibility aliases scoped to users of this legacy plugin.
|
||||
zstyle -s ':omz:plugins:laravel' php _omz_laravel_php || _omz_laravel_php=php
|
||||
alias la5="$_omz_laravel_php artisan"
|
||||
alias la5cache="$_omz_laravel_php artisan cache:clear"
|
||||
alias la5routes="$_omz_laravel_php artisan route:list"
|
||||
alias la5vendor="$_omz_laravel_php artisan vendor:publish"
|
||||
unset _omz_laravel_php
|
||||
|
||||
compdef _laravel5 artisan
|
||||
compdef _laravel5 la5
|
||||
compdef _artisan la5
|
||||
Reference in new issue
Block a user