From ac2f03adfedbf1d6414bf5e11b46ffe80d603b3f Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 25 Feb 2021 11:57:02 +0100 Subject: [PATCH] Improved both scripts --- Scripts/my-profile.ps1 | 8 ++++++-- Scripts/set-profile.ps1 | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Scripts/my-profile.ps1 b/Scripts/my-profile.ps1 index 08995e3e..bace4f48 100644 --- a/Scripts/my-profile.ps1 +++ b/Scripts/my-profile.ps1 @@ -1,3 +1,7 @@ -function prompt { $null } +write-host -foregroundColor green "Welcome to PowerShell $($PSVersionTable.PSVersion)" -write-host -foregroundColor green "Welcome" +#function prompt {$null} # PS> + +#function prompt { "$ " } # $ + +function prompt { "$(Get-Location)\> " } # C:\ diff --git a/Scripts/set-profile.ps1 b/Scripts/set-profile.ps1 index 32466fde..bd35536a 100755 --- a/Scripts/set-profile.ps1 +++ b/Scripts/set-profile.ps1 @@ -12,7 +12,7 @@ try { copy-item "$PathToRepo/Scripts/my-profile.ps1" "$PathToProfile" -force - write-host -foregroundColor green "OK - updated profile $PathToProfile" + write-host -foregroundColor green "OK - updated profile 'CurrentUserCurrentHost' (gets active on next login)" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"