Skip to content

Provide setting for low precision duration timers #307

@pridkett

Description

@pridkett

Is your feature request related to a problem? Please describe.
While bash and zsh have timers that provide µs precision, fish does not. This means that every command that finishes in less than a second will say something like: 23ms 0µs. Because everything is 0µs for the microseconds, that doesn't provide any additional information and just ends up needlessly expanding the prompt.

Describe the solution you'd like
An optional argument on the command line of -duration-low-precision to indicate that the command duration timer is low precision, or maybe you just don't want to see µs in your other shells.

Describe alternatives you've considered
I have a patch to completely remove µs that I've been maintaining for a couple of months, but I realize that a command line flag might be better here.

Additional context
Here's an output of the proposed patch showing just the duration module (and using the default fish prompt for clarity):
image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions