gum icon indicating copy to clipboard operation
gum copied to clipboard

log: add a `GUM_LOG_TIME` environment variable equivalent to `--time`

Open Infinidoge opened this issue 1 year ago • 1 comments

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.

Infinidoge avatar Dec 21 '24 20:12 Infinidoge

Hi! Is this feature open to being worked on? I'd love to give it a try.

Kushagra1480 avatar Aug 27 '25 18:08 Kushagra1480