Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dynamic date format similar to ls (Hour/Year based on file age) #1120

Open
toshirov opened this issue Feb 11, 2025 · 0 comments
Open

Comments

@toshirov
Copy link

I would like to request the implementation of a conditional date formatting behavior in lsd, similar to the one provided by the ls command. Currently, ls displays:

If the file is less than a year old: Month Day Hour (e.g., Feb 11 14:35)
If the file is a year old or older: Month Day Year (e.g., Feb 11 2023)

This behavior is very useful to differentiate between recent and older files, especially when managing directories with a large number of entries.

Proposed Functionality:

Add an option that allows lsd to automatically choose between two date formats based on the file's age:

If the file is less than a year old, use %b %d %H:%M.
If the file is a year or older, use %b %d %Y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant