Skip to content

Commit 907ca36

Browse files
authored
Improve shell alias docs (#8105)
1 parent 7e08ee4 commit 907ca36

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sail.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- [Introduction](#introduction)
44
- [Installation & Setup](#installation)
55
- [Installing Sail Into Existing Applications](#installing-sail-into-existing-applications)
6-
- [Configuring A Bash Alias](#configuring-a-bash-alias)
6+
- [Configuring A Shell Alias](#configuring-a-shell-alias)
77
- [Starting & Stopping Sail](#starting-and-stopping-sail)
88
- [Executing Commands](#executing-sail-commands)
99
- [Executing PHP Commands](#executing-php-commands)
@@ -71,22 +71,24 @@ If you would like to develop within a [Devcontainer](https://code.visualstudio.c
7171
php artisan sail:install --devcontainer
7272
```
7373

74-
<a name="configuring-a-bash-alias"></a>
75-
### Configuring A Bash Alias
74+
<a name="configuring-a-shell-alias"></a>
75+
### Configuring A Shell Alias
7676

7777
By default, Sail commands are invoked using the `vendor/bin/sail` script that is included with all new Laravel applications:
7878

7979
```shell
8080
./vendor/bin/sail up
8181
```
8282

83-
However, instead of repeatedly typing `vendor/bin/sail` to execute Sail commands, you may wish to configure a Bash alias that allows you to execute Sail's commands more easily:
83+
However, instead of repeatedly typing `vendor/bin/sail` to execute Sail commands, you may wish to configure a shell alias that allows you to execute Sail's commands more easily:
8484

8585
```shell
86-
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
86+
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
8787
```
8888

89-
Once the Bash alias has been configured, you may execute Sail commands by simply typing `sail`. The remainder of this documentation's examples will assume that you have configured this alias:
89+
To make sure this is always available, you may add this to your shell configuration file in your home directory, such as `~/.zshrc` or `~/.bashrc`, and then restart your shell.
90+
91+
Once the shell alias has been configured, you may execute Sail commands by simply typing `sail`. The remainder of this documentation's examples will assume that you have configured this alias:
9092

9193
```shell
9294
sail up

0 commit comments

Comments
 (0)