mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-24 00:43:35 +01:00
33 lines
1.2 KiB
PowerShell
Executable File
33 lines
1.2 KiB
PowerShell
Executable File
# My PowerShell Profile
|
|
# =====================
|
|
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
|
|
# Adapt the following lines to your needs, please.
|
|
|
|
|
|
# My Welcome Message
|
|
# ------------------
|
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
|
$Hostname = $(hostname)
|
|
$Time = (get-date).ToString('t')
|
|
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
|
|
"🧑$Username entered 📂$(Get-Location) at 💻$Hostname, it's $Time"
|
|
|
|
|
|
# My Command Prompt
|
|
# -----------------
|
|
function prompt { write-host -noNewline -foregroundColor yellow "`n➤"; return " " } # 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 mute -value mute-audio.ps1
|
|
set-alias -name unmute -value unmute-audio.ps1
|
|
set-alias -name .. -value cd-up.ps1 # 1 dir level up
|
|
set-alias -name ... -value cd-up2.ps1 # 2 dir levels up
|
|
set-alias -name .... -value cd-up3.ps1 # 3 dir levels up
|
|
set-alias -name ..... -value cd-up4.ps1 # 4 dir levels up
|