Updated my-profile.ps1

This commit is contained in:
Markus Fleschutz 2024-11-22 11:35:30 +01:00
parent 2917a123ac
commit 3c530df89f

View File

@ -1,20 +1,20 @@
# MY POWERSHELL PROFILE - it defines the look & feel of PowerShell.
# POWERSHELL PROFILE TO DEFINE THE LOOK & FEEL
# WINDOW TITLE
if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME }
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
# GREETING
Write-Host "👋 Welcome $username to $(hostname)'s PowerShell - type 'hlp' if you need help." -foregroundColor green
Write-Host "👋 Welcome $username to $(hostname)'s PowerShell - type 'FAQ' for help." -foregroundColor green
# PROMPT
function prompt { Write-Host "`n" -noNewline -foregroundColor yellow; return " " }
# ALIASES
set-alias -name enter -value enter-host.ps1
set-alias -name hlp -value write-help.ps1
set-alias -name ll -value Get-ChildItem # ll = list folder (long format)
del alias:ls -force -errorAction SilentlyContinue
set-alias -name ls -value list-folder.ps1 # ls = list folder (short format)
del alias:pwd -force -errorAction SilentlyContinue
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
Set-Alias -name enter -value enter-host.ps1
Set-Alias -name FAQ -value write-help.ps1
Set-Alias -name ll -value Get-ChildItem # ll = list folder (long format)
Del alias:ls -force -errorAction SilentlyContinue
Set-Alias -name ls -value list-folder.ps1 # ls = list folder (short format)
Del alias:pwd -force -errorAction SilentlyContinue
Set-Alias -name pwd -value list-workdir.ps1 # pwd = print working directory