Thanks for the replies and suggestions! You have confirmed my suspicion.
I have used the format.ps1xml approach and the select expressions approach and they both work, but have short-comings.
The select expression approach is fine for a one-off thing, but not if you have to do it for every column you want to display in the table (just to add extra spaces between columns). And it is not easily typed out.
The format.ps1xml approach is awesome for ultimate customizability, but it is over-kill for basic usage and it won’t work correctly in some situations (e.g. column data for one or more records is longer than the defined width for that column). You end up either wasting a lot of space between columns or only have a single space, which is no better off than you were to begin.
See below for an example of how it works today (1 space), how it could be (3 spaces) and (5 spaces) with a simple parameter. It is objectively easier to consume. I’m doing things like this all the time to inspect my data and sometimes to send it to team members (copy/paste or snip).
$containers | Format-Table
Id Name Created Status IPAddress Pid Platform Image Command
-- ---- ------- ------ --------- --- -------- ----- -------
c311319af3c0 pwsh-nano-1 2021-12-11 15:25 Up 29 hours 192.168.99.43 27248 windows pwsh-nano "ping -t localhost"
c911d82df957 pwsh-2 2021-12-05 16:30 Up 3 days 192.168.99.235 5420 windows pwsh "ping -t localhost"
$containers | Format-Table -SeparatorSpaces 3
Id Name Created Status IP Address PID Platform Image Command
-- ---- ------- ------ ---------- --- -------- ----- -------
c311319af3c0 pwsh-nano-1 2021-12-11 15:25 Up 29 hours 192.168.99.43 27248 windows pwsh-nano "ping -t localhost"
c911d82df957 pwsh-2 2021-12-05 16:30 Up 3 days 192.168.99.235 5420 windows pwsh "ping -t localhost"
$containers | Format-Table -SeparatorSpaces 5
Id Name Created Status IP Address PID Platform Image Command
-- ---- ------- ------ ---------- --- -------- ----- -------
c311319af3c0 pwsh-nano-1 2021-12-11 15:25 Up 29 hours 192.168.99.43 27248 windows pwsh-nano "ping -t localhost"
c911d82df957 pwsh-2 2021-12-05 16:30 Up 3 days 192.168.99.235 5420 windows pwsh "ping -t localhost"
To me, it seems like a lot of value for something that can’t (or at least shouldn’t) be that difficult for the MS PowerShell team to implement. They already have to be calculating the max length of any value in each column so they figure out the spacing for display, and they are just adding 1 additional space between columns. Instead of adding 1 space, add the number of spaces provided by the SeparatorSpaces parameter (or the global default, if the parameter wasn’t provided). The global default would be 1, so it would be backward compatible (no breaking changes).
What would be the best way to go about advocating for this feature enhancement?