Skip to content

Commit

Permalink
Use $Script:ShowHeader to decide whether to show header
Browse files Browse the repository at this point in the history
  • Loading branch information
joonro committed Jun 6, 2022
1 parent d9150c2 commit ed18ee8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/FileInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function FileInfo {

$ParentName = $Item.PSParentPath.Replace("Microsoft.PowerShell.Core\FileSystem::", "")

If ($Script:LastParentName -ne $ParentName) {
If ($Script:LastParentName -ne $ParentName -or $Script:ShowHeader) {
$Color = $GetChildItemColorTable.File['Directory']

Write-Host
Expand All @@ -45,6 +45,8 @@ function FileInfo {

Write-Host "Mode LastWriteTime Length Name"
Write-Host "---- ------------- ------ ----"

$Script:ShowHeader = $False
}

$Color = Get-FileColor $Item
Expand Down

0 comments on commit ed18ee8

Please sign in to comment.