mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-05 16:14:42 +02:00
Improve my-profile.ps1
This commit is contained in:
parent
bea6e65d49
commit
2030dc3820
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
# My Welcome Message
|
# My Welcome Message
|
||||||
# ------------------
|
# ------------------
|
||||||
write-host "❤️ Welcome to PowerShell $($PSVersionTable.PSVersion) at $(hostname), it's $(Get-date) ❤️"
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
||||||
|
$Hostname = $(hostname)
|
||||||
|
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
|
||||||
|
write-host "🧑 $Username enters PowerShell $($PSVersionTable.PSVersion) at $Hostname in $(Get-Location)"
|
||||||
write-host ""
|
write-host ""
|
||||||
|
|
||||||
|
|
||||||
@ -17,12 +20,7 @@ write-host ""
|
|||||||
|
|
||||||
# function prompt { "$ " } # result is: $
|
# function prompt { "$ " } # result is: $
|
||||||
|
|
||||||
function prompt {
|
function prompt { return "💲 " } # result is: 💲
|
||||||
if ($IsLinux) { $User = $(whoami) } else { $User = $env:USERNAME }
|
|
||||||
$host.ui.RawUI.WindowTitle = "$User @ $(hostname)"
|
|
||||||
write-host -foregroundColor blue -noNewLine "$(Get-Location)"
|
|
||||||
return "> "
|
|
||||||
} # result is: C:\>
|
|
||||||
|
|
||||||
|
|
||||||
# My Alias Names (sorted alphabetically)
|
# My Alias Names (sorted alphabetically)
|
||||||
|
Loading…
Reference in New Issue
Block a user