Skip to content

Commit a495b25

Browse files
authored
Merge pull request #128 from arpan3t/tablerowseparator
2 parents 07354b6 + cf04001 commit a495b25

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PwshSpectreConsole/public/formatting/Format-SpectreTable.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ function Format-SpectreTable {
4949
.PARAMETER Title
5050
The title of the table.
5151
52+
.PARAMETER ShowRowSeparators
53+
Shows row separators.
54+
5255
.PARAMETER AllowMarkup
5356
Allow Spectre markup in the table elements e.g. [green]message[/].
5457
@@ -132,6 +135,7 @@ function Format-SpectreTable {
132135
[int] $Width,
133136
[switch] $HideHeaders,
134137
[String] $Title,
138+
[switch] $ShowRowSeparators,
135139
[switch] $AllowMarkup,
136140
[switch] $Expand
137141
)
@@ -149,6 +153,7 @@ function Format-SpectreTable {
149153
'Width' { $table.Width = $Width }
150154
'HideHeaders' { $table.ShowHeaders = $false }
151155
'Title' { $tableoptions.Title = $Title }
156+
'ShowRowSeparators' { [Spectre.Console.TableExtensions]::ShowRowSeparators($table) | Out-Null }
152157
'AllowMarkup' { $rowoptions.AllowMarkup = $true }
153158
'Wrap' { $tableoptions.Wrap = $true ; $FormatTableParams.Wrap = $true }
154159
'View' { $FormatTableParams.View = $View }
@@ -218,4 +223,4 @@ function Format-SpectreTable {
218223

219224
return $table
220225
}
221-
}
226+
}

0 commit comments

Comments
 (0)