mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-04 23:54:59 +02:00
Improved my-profile.ps1
This commit is contained in:
parent
20c1d4beec
commit
e113db34f4
@ -1,19 +1,24 @@
|
|||||||
# my-profile.ps1 - Your Personal PowerShell Profile
|
# My PowerShell Profile
|
||||||
# -------------------------------------------------
|
# =====================
|
||||||
|
# Welcome to 'my-profile.ps1' - this file defines the look&feel of PowerShell.
|
||||||
|
# Simply comment/uncomment/adapt the following lines.
|
||||||
#
|
#
|
||||||
# NOTE: simply comment/uncomment/adapt the following lines:
|
#
|
||||||
|
# My Command Prompt
|
||||||
|
# -----------------
|
||||||
|
|
||||||
# function prompt {$null}
|
# function prompt {$null} # result is: PS>
|
||||||
# resulting prompt is: PS>
|
|
||||||
|
|
||||||
# function prompt { "$ " }
|
# function prompt { "$ " } # result is: $
|
||||||
# resultinng prompt is: $
|
|
||||||
|
|
||||||
function prompt {
|
function prompt {
|
||||||
$host.ui.RawUI.WindowTitle = "$(whoami)@$(hostname)"
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
||||||
|
$host.ui.RawUI.WindowTitle = "$Username @ $(hostname)"
|
||||||
write-host -foregroundColor blue -noNewLine "$(Get-Location)"
|
write-host -foregroundColor blue -noNewLine "$(Get-Location)"
|
||||||
return "> "
|
return "> "
|
||||||
}
|
} # result is: C:\>
|
||||||
# resulting prompt is: C:\>
|
|
||||||
|
|
||||||
|
|
||||||
|
# My Alias Names
|
||||||
|
# --------------
|
||||||
set-alias -name lsf -value get-childitem # lsf means list directory formatted
|
set-alias -name lsf -value get-childitem # lsf means list directory formatted
|
||||||
|
Loading…
Reference in New Issue
Block a user