diff --git a/activate.ps1 b/activate.ps1 index bc6f326e..4021aa29 100644 --- a/activate.ps1 +++ b/activate.ps1 @@ -11,6 +11,11 @@ if ($MyInvocation.CommandOrigin -eq 'runspace') { exit 1 } +function tye() { + $ProjectPath = Join-Path (Join-Path $PSScriptRoot "src") "tye" + dotnet run --project "$ProjectPath" @args +} + function deactivate ([switch]$init) { # reset old environment variables @@ -27,8 +32,9 @@ function deactivate ([switch]$init) { Remove-Item env:DOTNET_ROOT -ea ignore Remove-Item env:DOTNET_MULTILEVEL_LOOKUP -ea ignore if (-not $init) { - # Remove the deactivate function + # Remove the deactivate and dev-tye functions Remove-Item function:deactivate + Remove-Item function:tye } } diff --git a/activate.sh b/activate.sh index 4986e1b2..d4a3fbd5 100755 --- a/activate.sh +++ b/activate.sh @@ -32,6 +32,10 @@ if [ $sourced -eq 0 ]; then exit 1 fi +tye () { + dotnet run --project "$THIS_SCRIPT/src/tye" "$@" +} + deactivate () { # reset old environment variables @@ -57,6 +61,7 @@ deactivate () { if [ ! "${1:-}" = "init" ] ; then # Remove the deactivate function unset -f deactivate + unset -f tye fi }