mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-01 05:00:06 +02:00
Update what-is.ps1
This commit is contained in:
@ -14,8 +14,8 @@
|
||||
.EXAMPLE
|
||||
PS> ./export-to-serenade.ps1 Computer
|
||||
⏳ Found 499 PowerShell scripts...
|
||||
⏳ Writing to custom JavaScript file C:\Users\Markus\.serenade\scripts\PowerShell.js...
|
||||
✔️ export to Serenade with wake word "Computer" finished in 3 sec
|
||||
⏳ Writing custom JavaScript file C:\Users\Markus\.serenade\scripts\PowerShell.js...
|
||||
✔️ Exported to Serenade with wake word "Computer" in 3 sec
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
@ -31,7 +31,7 @@ try {
|
||||
|
||||
$Scripts = Get-ChildItem "$FilePattern"
|
||||
"⏳ Found $($Scripts.Count) PowerShell scripts..."
|
||||
"⏳ Writing to custom JavaScript file $TargetFile..."
|
||||
"⏳ Writing custom JavaScript file $TargetFile..."
|
||||
|
||||
"/* NOTE: This file has been generated automatically by export-to-serenade.ps1 */" | Set-Content "$TargetFile"
|
||||
foreach ($Script in $Scripts) {
|
||||
@ -41,7 +41,7 @@ try {
|
||||
}
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ export to Serenade with wake word `"$WakeWord`" finished in $Elapsed sec"
|
||||
"✔️ Exported to Serenade with wake word `"$WakeWord`" in $Elapsed sec"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -31,7 +31,7 @@ try {
|
||||
foreach($Row in $Table) {
|
||||
if ($Row.Abbreviation -eq $abbreviation) {
|
||||
$Basename = (get-item "$File").Basename
|
||||
Reply "→ $($Row.Definition) ($($Row.Abbreviation)) in $Basename."
|
||||
Reply " - $($Row.Definition) ($($Row.Abbreviation)) in $Basename"
|
||||
$FoundOne = $true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user