PowerShell/scripts/my-profile.ps1

19 lines
762 B
PowerShell
Raw Normal View History

# MY POWERSHELL PROFILE (defines the look & feel of PowerShell)
2022-04-07 08:32:52 +02:00
# WINDOW TITLE
if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME }
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
# GREETING
Write-Host "👋 Welcome $username to PowerShell at $(hostname)." -foregroundColor green
2022-04-07 08:32:52 +02:00
# COMMAND PROMPT
function prompt { Write-Host "`n" -noNewline -foregroundColor yellow; return " " }
2021-02-27 11:19:57 +01:00
2022-04-07 08:32:52 +02:00
# ALIAS NAMES
2021-05-04 20:08:38 +02:00
del alias:pwd -force -errorAction SilentlyContinue
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)