Read Powershell profile alias in a shellscript

I have a Powershell profile set up with this alias:

New-Alias dev C:\websites\dev\bin\ -Scope Global

from the Powershell this works fine. is actually a binary (the .sh will come off, on for other reasons) that sets some env variables and runs commands.

I have a shell script that looks like this:


dev rebuild

dev exec identity php artisan migrate:fresh
dev exec identity php artisan db:seed --class=DemoSeeder

dev exec matching php artisan migrate:fresh --seed
dev exec matching php artisan db:seed --class=DemoSeeder

This fails with bash: dev: command not found

I don't think this is any sort of exporting alias problem, since it works fine from the Powershell cli, but rather that the shell script can't read the alias. Possible solutions seem to prefer that I modify a .bashrc to set the alias, or to try to set it inside the script itself, but I don't think either of these will be very good to work across a team with different operating systems & repo locations

How can I get the .sh script to read the dev alias?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum