PowerShell/Scripts/my-profile.ps1
2021-04-21 07:39:15 +02:00

34 lines
1.1 KiB
PowerShell
Executable File

# My PowerShell Profile
# =====================
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
# Comment, uncomment or adapt the following lines to your needs, please.
# My Welcome Message
# ------------------
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
$Hostname = $(hostname)
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
"🧑$Username entered 💻$Hostname at 📂$(Get-Location)"
# My Command Prompt
# -----------------
# function prompt {$null} # result is: PS>
# function prompt { "$ " } # result is: $
function prompt { "`n💲 " } # result is: 💲
# My Alias Names (sorted alphabetically)
# --------------
del alias:pwd -force
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
set-alias -name ll -value get-childitem # ll = list long
set-alias -name lsf -value list-dir.ps1 # lsf = list directory formatted
set-alias -name .. -value cd-up.ps1 1 # go 1 dir up
set-alias -name ... -value cd-up.ps1 2 # go 2 dirs up
set-alias -name .... -value cd-up.ps1 3 # go 3 dirs up
set-alias -name ..... -value cd-up.ps1 4 # go 4 dirs up