mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-17 16:11:22 +02:00
Updated the manuals
This commit is contained in:
@ -6,7 +6,7 @@ This PowerShell script queries the meaning of the given term/abbreviation/etc. a
|
||||
Parameters
|
||||
----------
|
||||
```powershell
|
||||
PS> ./what-is.ps1 [[-term] <String>] [<CommonParameters>]
|
||||
/home/markus/Repos/PowerShell/scripts/what-is.ps1 [[-term] <String>] [<CommonParameters>]
|
||||
|
||||
-term <String>
|
||||
Specifies the term to query
|
||||
@ -60,9 +60,9 @@ Script Content
|
||||
param([string]$term = "")
|
||||
|
||||
try {
|
||||
if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" }
|
||||
if ($term -eq "" ) { $term = Read-Host "Enter the term to query" }
|
||||
|
||||
$files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv")
|
||||
$files = Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv"
|
||||
$basename = ""
|
||||
foreach($file in $files) {
|
||||
$table = Import-CSV "$file"
|
||||
@ -73,7 +73,8 @@ try {
|
||||
}
|
||||
}
|
||||
if ($basename -eq "") {
|
||||
& "$PSScriptRoot/open-URL.ps1" "https://www.google.com/search?q=what+is+$term" "🤷 Sorry, no '$term' entry found. Let's google it at: "
|
||||
Write-Host "🤷 Sorry, '$term' is unknown to me. Ctrl + click here to google it: " -noNewline
|
||||
Write-Host "https://www.google.com/search?q=what+is+$term" -foregroundColor blue
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
@ -82,4 +83,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 08/15/2024 09:50:55)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 11/08/2024 12:34:56)*
|
||||
|
Reference in New Issue
Block a user