mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-21 23:43:25 +01:00
Updated my-profile.ps1
This commit is contained in:
parent
e16e7baac6
commit
14d9e2de91
@ -5,7 +5,7 @@ if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME }
|
|||||||
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
|
$host.ui.RawUI.WindowTitle = "$username @ $(hostname)"
|
||||||
|
|
||||||
# GREETING
|
# GREETING
|
||||||
Write-Host "👋 Welcome $username to $(hostname)'s PowerShell (type 'hlp' for help)" -foregroundColor green
|
Write-Host "👋 Welcome $username to $(hostname)'s PowerShell - type 'hlp' if you need help." -foregroundColor green
|
||||||
|
|
||||||
# PROMPT
|
# PROMPT
|
||||||
function prompt { Write-Host "`n➤ " -noNewline -foregroundColor yellow; return " " }
|
function prompt { Write-Host "`n➤ " -noNewline -foregroundColor yellow; return " " }
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
PS> ./update-powershell-profile.ps1
|
PS> ./update-powershell-profile.ps1
|
||||||
⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'...
|
⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'...
|
||||||
⏳ (2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1...
|
⏳ (2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1...
|
||||||
✅ PowerShell profile updated - it get's active on next login.
|
✅ Updated your PowerShell profile, it get's active on next login.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -27,7 +27,7 @@ try {
|
|||||||
$null = New-Item -Path $pathToProfile -ItemType "file" -Force
|
$null = New-Item -Path $pathToProfile -ItemType "file" -Force
|
||||||
Copy-Item "$path" "$pathToProfile" -force
|
Copy-Item "$path" "$pathToProfile" -force
|
||||||
|
|
||||||
"✅ PowerShell profile updated - it get's active on next login."
|
"✅ Updated your PowerShell profile, it get's active on next login."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user