Created
August 13, 2022 10:35
-
-
Save jamescurran/3110a8dfbb1ba85a6e5f6de41c7edbdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function global:prompt { | |
$Success = $? | |
Write-Host -Object $pwd -ForegroundColor Magenta | |
$date = Get-Date -Format "dd-MMM-yyyy HH:mm:ss" | |
Write-Host -Object $date -ForegroundColor Green | |
$quote = get-content "C:\Users\zames\OneDrive\Documents\times\$(Get-Date -Format "HH_mm").json" | ConvertFrom-Json | Get-random | |
Write-Host -Object $quote.Quote_first.Replace("<br>", "`n") -ForegroundColor Blue -NoNewLine | |
Write-Host -Object $quote.Quote_time_case -ForegroundColor Yellow -NoNewLine | |
Write-Host -Object $quote.Quote_last.Replace("<br>", "`n") -ForegroundColor Blue -NoNewLine | |
$author = $quote.Author | |
$source = $quote.Title | |
Write-Host -Object " ($author, '$source')" -ForegroundColor Cyan | |
return "> " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment