Last active
November 25, 2022 16:06
-
-
Save unisys12/597ecf20e6d4b41470913d4beb9bd0b8 to your computer and use it in GitHub Desktop.
Create a alias for Laravel Sail on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Make an alias that can be used in Windows Terminal, | |
REM that points to a local instance of Laravel Sail | |
REM | |
REM *OPTION 1* | |
REM - Create a file called alias.bat in `C:/Windows` dir | |
REM and copy and paste the snippet below into it. | |
REM - Go into the root of the project that | |
REM will be using Sail as a development environment and | |
REM type alias.bat in the terminal. | |
REM | |
REM *OPTION 2* | |
REM Within Windows Terminal open Settings | |
REM - Select whatever is your default prompt, mine is Command | |
REM Prompt. | |
REM - Click on the Command Line option and edit the launch | |
REM command to automatically load the alias file on load | |
REM `cmd.exe -i /K alias.bat` | |
REM | |
REM ** NOTE ** | |
REM Option 2 is sort of a waste, but a good technique to know | |
REM in case you have other alias you want to load as well. | |
@echo off | |
if not exist vendor/laravel/sail/bin/sail ( | |
echo Currently not in Sail Project | |
) ELSE ( | |
doskey sail = bash vendor/laravel/sail/bin/sail $* | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment