mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-09 01:25:04 +01:00
23 lines
478 B
PowerShell
23 lines
478 B
PowerShell
|
<#
|
|||
|
.SYNOPSIS
|
|||
|
Repeats the last reply
|
|||
|
.DESCRIPTION
|
|||
|
This repeats the last reply by text-to-speech (TTS).
|
|||
|
.EXAMPLE
|
|||
|
PS> ./repeat-last-reply
|
|||
|
.NOTES
|
|||
|
Author: Markus Fleschutz · License: CC0
|
|||
|
.LINK
|
|||
|
https://github.com/fleschutz/PowerShell
|
|||
|
#>
|
|||
|
|
|||
|
if (test-path "$HOME/.last_reply.txt" -pathType leaft) {
|
|||
|
$Reply = "OK, I said: "
|
|||
|
$Reply += Get-Content "$HOME/.last_reply.txt"
|
|||
|
} else {
|
|||
|
$Reply = "Sorry, I can't remember."
|
|||
|
}
|
|||
|
|
|||
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
|||
|
exit 0 # success
|