Update what-is.ps1

This commit is contained in:
Markus Fleschutz 2023-10-18 17:22:03 +02:00
parent fd5751ddaf
commit d0cf6df8b5
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
ABBR,MEANING
e.g.,"'exempli gratia' in Latin, meaning: 'for example'"
0D,obvious deed
1AM,Air Mechanic 1st Class
1D,One-Dimensional

Can't render this file because it has a wrong number of fields in line 7.

View File

@ -7,7 +7,7 @@
Specifies the abbreviation to query
.EXAMPLE
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
https://github.com/fleschutz/PowerShell
.NOTES
@ -25,7 +25,7 @@ try {
foreach($row in $table) {
if ($row.ABBR -ne $abbr) { continue }
$basename = (Get-Item "$file").Basename -Replace "_"," "
"💡 $($row.ABBR) in $basename refers to: $($row.MEANING)"
"💡 $($row.ABBR) in $basename refers to $($row.MEANING)"
}
}
if ($basename -eq "") { "🤷‍ Sorry, no entry '$abbr' in my database (located at .../Data/Abbr/)." }