Skip to content

log: add a GUM_LOG_TIME environment variable equivalent to --time #787

@Infinidoge

Description

@Infinidoge

Is your feature request related to a problem? Please describe.
I want to use gum log with a consistent display format, however not all parts of that actually have environment variables. Namely: You can't set the time format with an environment variable.

Additional note, may make into its own issue: The gum log examples include gum log -tsl ..., which is an invalid command for the output because it will treat sl as the time format.

Describe the solution you'd like
GUM_LOG_TIME environment variable that is equivalent to setting --time.

Describe alternatives you've considered
I don't believe there is an alternative, as environment variables are the dedicated way for setting stuff persistently like this. Time has style variables, so it not having a corresponding format variable is jarring.

Additional context
Needing to do gum log -t timeonly over and over again led to me making a function to wrap gum log in my script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions