2024-09-16 19:56:50 +02:00
|
|
|
|
# MY POWERSHELL PROFILE - it defines the look & feel of PowerShell.
|
2021-04-10 09:11:56 +02:00
|
|
|
|
|
2022-04-07 08:32:52 +02:00
|
|
|
|
# WINDOW TITLE
|
2024-05-22 07:20:21 +02:00
|
|
|
|
if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME }
|
|
|
|
|
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
|
2021-04-10 09:11:56 +02:00
|
|
|
|
|
2024-05-15 14:05:57 +02:00
|
|
|
|
# GREETING
|
2024-09-23 14:20:50 +02:00
|
|
|
|
Write-Host "👋 Welcome $username to $(hostname)'s PowerShell (type 'hlp' for help)" -foregroundColor green
|
2024-05-15 14:05:57 +02:00
|
|
|
|
|
2024-09-16 19:56:50 +02:00
|
|
|
|
# PROMPT
|
2024-05-15 14:05:57 +02:00
|
|
|
|
function prompt { Write-Host "`n➤ " -noNewline -foregroundColor yellow; return " " }
|
2021-02-27 11:19:57 +01:00
|
|
|
|
|
2024-09-16 19:56:50 +02:00
|
|
|
|
# ALIASES
|
2021-05-04 20:08:38 +02:00
|
|
|
|
del alias:pwd -force -errorAction SilentlyContinue
|
2024-09-03 15:03:15 +02:00
|
|
|
|
set-alias -name hlp -value write-help.ps1
|
2021-04-20 16:47:44 +02:00
|
|
|
|
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
|
2022-04-07 08:32:52 +02:00
|
|
|
|
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)
|