mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 09:04:18 +01:00
Update what-is.ps1
This commit is contained in:
parent
fd5751ddaf
commit
d0cf6df8b5
@ -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.
|
@ -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/)." }
|
||||
|
Loading…
Reference in New Issue
Block a user