-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.
Description
Summary of the new feature/enhancement
When I run Get-History, I get this:
Id CommandLine
-- -----------
1 Add-Type -Path C:\Temp\Humanizer.Core.2.6.2\lib\netstandard2.0\Humanizer.dll
2 $ts = [TimeSpan]::new(1,42,69)
3 [Humanizer.TimeSpanHumanizeExtensions]::Humanize($ts, 3)
4 start-sleep 12
I want to get this:
Id Duration CommandLine
-- -------- -----------
1 0.00:00:00 Add-Type -Path C:\Temp\Humanizer.Core.2.6.2\lib\netstandard2.0\Humanizer.dll
2 0.00:00:00 $ts = [TimeSpan]::new(1,42,69)
3 0.00:00:00 [Humanizer.TimeSpanHumanizeExtensions]::Humanize($ts, 3)
4 0.00:00:12 start-sleep 12
It is great that we added Duration but this info is a bit buried for the average user. We could surface Duration in the default output of Get-History. It would be easy. The question is, is this a good "add"? I think so but wonder what other folks think.
Proposed technical implementation details (optional)
Update the format ps1xml file for HistoryInfo to add a table column (right aligned) for Duration using a formatting string like "d\.hh\:mm\:ss". We would need to check the implications of different culture info.
vexx32, dragonwolf83, kvprasoon and wisemoth
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.