mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-27 12:18:43 +02:00
Update what-is.ps1
This commit is contained in:
parent
fd5751ddaf
commit
d0cf6df8b5
@ -1,4 +1,5 @@
|
|||||||
ABBR,MEANING
|
ABBR,MEANING
|
||||||
|
e.g.,"'exempli gratia' in Latin, meaning: 'for example'"
|
||||||
0D,obvious deed
|
0D,obvious deed
|
||||||
1AM,Air Mechanic 1st Class
|
1AM,Air Mechanic 1st Class
|
||||||
1D,One-Dimensional
|
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
|
Specifies the abbreviation 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
|
||||||
@ -25,7 +25,7 @@ try {
|
|||||||
foreach($row in $table) {
|
foreach($row in $table) {
|
||||||
if ($row.ABBR -ne $abbr) { continue }
|
if ($row.ABBR -ne $abbr) { continue }
|
||||||
$basename = (Get-Item "$file").Basename -Replace "_"," "
|
$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/)." }
|
if ($basename -eq "") { "🤷 Sorry, no entry '$abbr' in my database (located at .../Data/Abbr/)." }
|
||||||
|
Loading…
Reference in New Issue
Block a user