diff --git a/base/Edit-MyScript.ps1 b/base/Edit-MyScript.ps1 index c61f2f4..d049607 100644 --- a/base/Edit-MyScript.ps1 +++ b/base/Edit-MyScript.ps1 @@ -83,11 +83,12 @@ foreach( $local:p in $ScriptPaths ) { } $local:sw = [System.Diagnostics.Stopwatch]::StartNew(); -Edit-TextFile $ScriptPaths +Edit-TextFile -Path $ScriptPaths $sw.Stop(); -if( $sw.Elapsed.TotalSeconds -lt 1 ) { - $null = Read-Host "Waiting before refreshing. Press when you're done editing ( don't forget to save ;) )..." +if( $sw.Elapsed.TotalSeconds -lt 3 ) { + Write-Host -ForegroundColor DarkGreen "When done editing, you might want to run '. Reload-MyScripts'" + return } Get-Command -ListImported Reload-MyScripts -ErrorAction SilentlyContinue |