mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-11-11 11:11:50 -05:00
feat(laravel): add setting to override the php command (#14146)
Aliases always ran `php artisan`, so users of Laravel Herd (`herd php`) or a versioned binary (`php8.4`) couldn't use them. The new `zstyle ':omz:plugins:laravel' php` setting replaces `php` in every alias; without it the aliases are unchanged.
This commit is contained in:
@@ -6,6 +6,21 @@ This plugin adds aliases and autocompletion for Laravel [Artisan](https://larave
|
||||
plugins=(... laravel)
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
By default the aliases run `php artisan`. To use a different PHP command, such as
|
||||
`herd php` (which runs the PHP version the [Laravel Herd](https://herd.laravel.com) site
|
||||
is isolated to, instead of Herd's global version) or a specific version like `php8.4`,
|
||||
set this before Oh My Zsh is sourced:
|
||||
|
||||
```zsh
|
||||
zstyle ':omz:plugins:laravel' php 'herd php'
|
||||
```
|
||||
|
||||
`php` in the aliases below is then replaced with that command.
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Description |
|
||||
|:-:|:-:|
|
||||
| `artisan` | `php artisan` |
|
||||
|
||||
Reference in New Issue
Block a user