Jaykul / PowerLine

A more PowerShell prompt
MIT License
567 stars 31 forks source link

Get-Elapsed -Format doesn't work #6

Closed rkeithhill closed 8 years ago

rkeithhill commented 8 years ago

The parameter/arg get passed to Get-History because of the @PSBoundParameters and Get-History barfs:

PS>Get-Elapsed -Format '{0:h\:mm\:ss\.fff}'
Get-History : A parameter cannot be found that matches parameter name 'Format'.
At C:\Users\Keith\Documents\WindowsPowerShell\Modules\PowerLine\1.0.0\PowerLine.psm1:25 char:40
+    $LastCommand = Get-History -Count 1 @PSBoundParameters
+                                        ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-History], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetHistoryCommand
Jaykul commented 8 years ago

Well, that was silly of me. I'll fix that in the next build.

Jaykul commented 8 years ago

Fixed in v2