Improve write-quote.ps1

This commit is contained in:
Markus Fleschutz
2021-08-09 10:52:29 +02:00
parent af119fc7db
commit ec6730c09b
2 changed files with 18 additions and 1 deletions

View File

@ -21,7 +21,11 @@ try {
$Quote = $Table[$Index].Quote
$Author = $Table[$Index].Author
"📣 $Quote <$Author>"
write-host '“'$Quote' ”'
$Spaces = " "
$Spaces = $Spaces.Substring(0, $Quote.Length - $Author.Length)
write-host "$Spaces $($Author.toUpper())"
exit 0
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"