Skip to content

bug: time-style option does not properly format recent files #1479

@schmoelder

Description

@schmoelder
  • eza version: v0.21.3
  • The command-line arguments you are using
  • Wezterm / tmux / zsh; Gnome Terminal / bash;
  • Ubuntu 24.04 on x86

Maybe I don't fully understand what's going on but I cannot get this to work. So maybe it's a ME-problem, maybe it's not well documented, or there is a bug. Hope someone can help.

From the documentation:

Alternatively, can be a two line string, the first line will be used for non-recent files and the second for recent files. E.g., if is "%Y-%m-%d %H--%m-%d %H:%M", non-recent files => "2022-12-30 13", recent files => "--09-30 13:34".

Naively, the first thing I tried was the following:

eza --long --time-style="+%Y-%m-%d %H<newline>--%m-%d %H:%M"

And this is the output:

drwxr-x---     - jo 2025-03-08 09<newline>--03-08 09:45 Bilder

Then, I tried this:

eza --long --time-style="+%Y-%m-%d %H\n--%m-%d %H:%M"

and got:

drwxr-x---     - jo 2025-03-08 09\n--03-08 09:45 Bilder

Then, I tried storing it in an environment variable:

export custom_time_format="+%Y-%m-%d %H\n--%m-%d %H:%M"
eza --long --time-style=$custom_time_format

but still nothing...

So what did I do wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions