From 53efcf0fc87487b37f3afcb69fe4dfb82da11eaf Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 28 Apr 2021 17:27:23 +0200 Subject: [PATCH] Improve the prompt --- Scripts/my-profile.ps1 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Scripts/my-profile.ps1 b/Scripts/my-profile.ps1 index 1044c62e..e28baa9a 100755 --- a/Scripts/my-profile.ps1 +++ b/Scripts/my-profile.ps1 @@ -1,25 +1,21 @@ ļ»æ# My PowerShell Profile # ===================== # Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell. -# Comment, uncomment or adapt the following lines to your needs, please. +# Adapt the following lines to your needs, please. # My Welcome Message # ------------------ if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME } $Hostname = $(hostname) -$host.ui.RawUI.WindowTitle = "$Username @ $Hostname" $Time = (get-date).ToString('t') +$host.ui.RawUI.WindowTitle = "$Username @ $Hostname" "šŸ§‘$Username entered šŸ“‚$(Get-Location) at šŸ’»$Hostname, it's $Time" # My Command Prompt # ----------------- -# function prompt {$null} # result is: PS> - -# function prompt { "$ " } # result is: $ - -function prompt { "`nšŸ’² " } # result is: šŸ’² +function prompt { write-host -noNewline -foregroundColor yellow "`nāž¤āž¤"; return " " } # result is: āž¤āž¤ # My Alias Names (sorted alphabetically)