Updated my-profile.ps1

This commit is contained in:
Markus Fleschutz 2024-09-16 19:56:50 +02:00
parent 69bb7d8a3d
commit fb0c4e8783

View File

@ -1,16 +1,16 @@
# MY POWERSHELL PROFILE (defines the look & feel of PowerShell) # MY POWERSHELL PROFILE - it defines the look & feel of PowerShell.
# WINDOW TITLE # WINDOW TITLE
if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME } if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME }
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)" $host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
# GREETING # GREETING
Write-Host "👋 Hi $username @ $(hostname) - type 'hlp' for help." -foregroundColor green Write-Host "👋 Welcome $username to $(hostname) - type 'hlp' for help." -foregroundColor green
# COMMAND PROMPT # PROMPT
function prompt { Write-Host "`n" -noNewline -foregroundColor yellow; return " " } function prompt { Write-Host "`n" -noNewline -foregroundColor yellow; return " " }
# ALIAS NAMES # ALIASES
del alias:pwd -force -errorAction SilentlyContinue del alias:pwd -force -errorAction SilentlyContinue
set-alias -name hlp -value write-help.ps1 set-alias -name hlp -value write-help.ps1
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory