Skip to content

Conversation

loicalbertin
Copy link

@loicalbertin loicalbertin commented Jun 30, 2025

Describe your changes

Add an optional modtime section to the filepicker. This makes the filepicker looks like a bit more ls -l.

For backward compatibility this is disabled by default.

The default modification time layout format is similar to the one in ls -l. This is configurable using standard time.Format() supported layouts.

Related issue/discussion:

Issue: #805 (v2) Add modification time to the filepicker

Discussion: #792

Checklist before requesting a review

If this is a feature

To make the filepicker looks like a bit more `ls -l`, allow to optionally display file modification time.
For backward compatibility this is disabled by default.

The default modification time layout format is similar to the one in `ls -l`.
This is configurable using standard time.Format() supported layouts.

Fixes Add modification time to the filepicker charmbracelet#780
@loicalbertin loicalbertin requested a review from bashbunni as a code owner June 30, 2025 19:59
@meowgorithm meowgorithm self-requested a review August 13, 2025 17:55
)

// DefaultModTimeLayout is the default layout used to format modification time for a given file.
const DefaultModTimeLayout = "Jan _2 15:04"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to export this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason expect to have it easily accessible in the documentation.

We could make it private if you prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, well that's good enough reason to keep it public.

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

Successfully merging this pull request may close these issues.

2 participants