Powershell: [Feature Request] Add Parameter "-Readable" to cmdlet Get-ChildItem

Created on 24 Feb 2020  路  3Comments  路  Source: PowerShell/PowerShell

Summary of the new feature/enhancement

Would you please add a parameter -Readable to cmdlet Get-ChildItem ? So that the output is more readable:

Get-ChildItem "D:\Downloads\PowerShell-7.0.0-rc.3-win-x64.zip" -Readable
#
#        Directory: D:\Downloads
#
# Mode  LastWriteTime      Length   Name
# ----  -------------      ------   ----
# -a--- 2/24/2020 08:44:16 88.76 MB PowerShell-7.0.0-rc.3-win-x64.zip
#

If there're large files, it's much difficult to quick check the file sizes.

Issue-Enhancement

Most helpful comment

Hi @chenrylee There's no actual reason to add an new flag for this. We could just change the default formatter to render numbers the way you've shown (though we'd probably use PowerShell literal format e.g. 84mb with no space.) Changes to the way output is rendered is (technically) not a breaking change.

All 3 comments

Hi @chenrylee There's no actual reason to add an new flag for this. We could just change the default formatter to render numbers the way you've shown (though we'd probably use PowerShell literal format e.g. 84mb with no space.) Changes to the way output is rendered is (technically) not a breaking change.

MB or MiB?

MB or MiB?

Generally, MB, and there's an explanation in the cmdlet help.

Was this page helpful?
0 / 5 - 0 ratings