2024-11-22 11:35:30 +01:00
|
|
|
|
# POWERSHELL PROFILE TO DEFINE THE LOOK & FEEL
|
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-12-02 11:24:14 +01:00
|
|
|
|
Write-Host "✨ Welcome $username to $(hostname)'s PowerShell - type 'FAQ' 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
|
2024-11-22 11:35:30 +01:00
|
|
|
|
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
|