Private/UI.ps1
<#TODO: Test#> function Confirm-Choice { param( [Parameter(Mandatory=$True)][String]$Title, [Parameter(Mandatory=$True)][String]$Prompt, [Parameter(Mandatory=$False)][Switch]$DefaultsToYes ) $Default = if ($DefaultsToYes) { 0 } else { 1 } return ($Host.UI.PromptForChoice($Title,$Prompt,@('&Yes','&No'), $Default) -eq 0) } function Wait-ForKeyPress { Write-Host -NoNewline -Object 'Press any key when you are finished editing...' -ForegroundColor Yellow $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') } function Open-PowershellEditor { param([String]$Path) powershell.exe $Path } function Get-EnvironmentModuleDirectories { return ($env:PSModulePath.Split(';') | ForEach-Object { Get-Item $_ }).FullName } |