mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-08 22:10:14 +01:00
Improve the prompt
This commit is contained in:
parent
2345cc14c8
commit
53efcf0fc8
@ -1,25 +1,21 @@
|
|||||||
# My PowerShell Profile
|
# My PowerShell Profile
|
||||||
# =====================
|
# =====================
|
||||||
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
|
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
|
||||||
# Comment, uncomment or adapt the following lines to your needs, please.
|
# Adapt the following lines to your needs, please.
|
||||||
|
|
||||||
|
|
||||||
# My Welcome Message
|
# My Welcome Message
|
||||||
# ------------------
|
# ------------------
|
||||||
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
||||||
$Hostname = $(hostname)
|
$Hostname = $(hostname)
|
||||||
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
|
|
||||||
$Time = (get-date).ToString('t')
|
$Time = (get-date).ToString('t')
|
||||||
|
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
|
||||||
"🧑$Username entered 📂$(Get-Location) at 💻$Hostname, it's $Time"
|
"🧑$Username entered 📂$(Get-Location) at 💻$Hostname, it's $Time"
|
||||||
|
|
||||||
|
|
||||||
# My Command Prompt
|
# My Command Prompt
|
||||||
# -----------------
|
# -----------------
|
||||||
# function prompt {$null} # result is: PS>
|
function prompt { write-host -noNewline -foregroundColor yellow "`n➤➤"; return " " } # result is: ➤➤
|
||||||
|
|
||||||
# function prompt { "$ " } # result is: $
|
|
||||||
|
|
||||||
function prompt { "`n💲 " } # result is: 💲
|
|
||||||
|
|
||||||
|
|
||||||
# My Alias Names (sorted alphabetically)
|
# My Alias Names (sorted alphabetically)
|
||||||
|
Loading…
Reference in New Issue
Block a user