Terminal-Icons icon indicating copy to clipboard operation
Terminal-Icons copied to clipboard

Modified Terminal-Icons.format.ps1xml to format Length property

Open DBremen opened this issue 4 years ago • 4 comments

Modified Terminal-Icons.format.ps1xml to format output of Length property into B|KB|MB|GB respectively.

Description

This adds a formatted Length output for files and directories (including sub-folders). Makes the output slower (though it's reasonably fast even for bigger folders), but also adds useful more readable info.

Related Issue

https://github.com/devblackops/Terminal-Icons/issues/9

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

DBremen avatar Sep 26 '19 20:09 DBremen

Hi @DBremen. I like this but I think adding size info to folders with recursive traversals slows things down too much. Perhaps we can add some basic configuration system to Terminal-Icons so the user can elect to enable this feature if they wish. As it stands right now, I'm not going to merge this until we have a way to optionally enable it. Hope you understand.

devblackops avatar Oct 18 '19 04:10 devblackops

sure no worries.

DBremen avatar Oct 19 '19 17:10 DBremen

@DBremen @devblackops Perhaps we can have the size display (KB|MB|GB) for just files for now? That would still be helpful.

rashil2000 avatar Oct 26 '20 07:10 rashil2000

I've prototyped out a format file that combines Terminal-Icons and PowershellHumanizer.

https://gist.github.com/cdhunt/62069848ed81f371d4c760b0c5465d09

cdhunt avatar Apr 09 '21 17:04 cdhunt