This will allow you to create aliases that take a command,
and execute it in a target directory when that is available
Usage:
-
download
execute-in.shand place it in your home dir -
make this file executable
chmod +x execute-in.sh -
create an alias
alias `command`="~/execute-in.sh `target` `command`"
alias yarn="~/execute-in.sh app/javascript yarn"