mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 07:53:21 +01:00
Updated what-is.ps1
This commit is contained in:
parent
d796331f19
commit
75ef111a18
@ -2789,6 +2789,7 @@ MACHO,MAssive Compact Halo Object
|
|||||||
MADD,"Mothers Against Drunk Driving,MyoAdenylate Deaminase Deficiency,Multiply-Add"
|
MADD,"Mothers Against Drunk Driving,MyoAdenylate Deaminase Deficiency,Multiply-Add"
|
||||||
MAF,Maintenance Action Form
|
MAF,Maintenance Action Form
|
||||||
MAFF,Ministry of Agriculture,Forestry and Fisheries (various countries)
|
MAFF,Ministry of Agriculture,Forestry and Fisheries (various countries)
|
||||||
|
MAGA,Make America Great Again
|
||||||
MAGIC,Major Atmospheric Gamma-ray Imaging Cherenkov (telescope)
|
MAGIC,Major Atmospheric Gamma-ray Imaging Cherenkov (telescope)
|
||||||
MAGNETAR,Metaprogrammable AGent NETwork ARchitecture
|
MAGNETAR,Metaprogrammable AGent NETwork ARchitecture
|
||||||
MAGTF,Marine Air-Ground Task Force
|
MAGTF,Marine Air-Ground Task Force
|
||||||
|
Can't render this file because it has a wrong number of fields in line 8.
|
@ -7,7 +7,7 @@
|
|||||||
Specifies the term to query
|
Specifies the term to query
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./what-is VTOL
|
PS> ./what-is VTOL
|
||||||
💡 VTOL in aviation refers to Vertical Take-Off and Landing
|
💡 VTOL in aviation refers to: Vertical Take-Off and Landing
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -18,6 +18,7 @@ param([string]$term = "")
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" }
|
if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" }
|
||||||
|
|
||||||
$files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv")
|
$files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv")
|
||||||
$basename = ""
|
$basename = ""
|
||||||
foreach($file in $files) {
|
foreach($file in $files) {
|
||||||
@ -28,7 +29,9 @@ try {
|
|||||||
"💡 $($row.TERM) in $basename refers to: $($row.MEANING)"
|
"💡 $($row.TERM) in $basename refers to: $($row.MEANING)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($basename -eq "") { "🤷 Sorry, no '$term' entry found. Use <Ctrl> <Click> to google it: https://www.google.com/search?q=what+is+$term" }
|
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: "
|
||||||
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user